Skip to content

Commit

Permalink
winget releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
therealpaulgg committed Mar 10, 2024
1 parent dd50c7e commit bc617de
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v2
Expand All @@ -34,8 +34,8 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v4
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.19.7"
-
Expand All @@ -48,22 +48,22 @@ jobs:
& "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" /dMyAppVersion="${{github.ref_name}}" "$env:GITHUB_WORKSPACE\win-build\setup.iss"
shell: powershell
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ssh-sync-setup
path: ./win-build/Output/ssh-sync-setup.exe
retention-days: 5
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.19.7"
- name: Go Build
run: go build -o ssh-sync -ldflags "-X main.version=${{github.ref_name}}"
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ssh-sync
path: ./ssh-sync
Expand All @@ -72,7 +72,7 @@ jobs:
needs: [build-docker, build-windows, build-linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
- uses: ncipollo/release-action@v1
Expand All @@ -82,18 +82,8 @@ jobs:
needs: [build-docker, build-windows, build-linux, release]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install winget
uses: Cyberboss/install-winget@v1
- name: Install wingetcreate
run: winget install --id=Microsoft.WingetCreate --exact --accept-package-agreements --accept-source-agreements
- name: Update winget manifest
env:
ACCESS_TOKEN_CLASSIC: ${{ secrets.ACCESS_TOKEN_CLASSIC }}
run: |
$tag = "${{ github.ref_name }}"
wingetcreate update therealpaulgg.ssh-sync --version $tag --token "$env:ACCESS_TOKEN_CLASSIC" -u https://github.com/therealpaulgg/ssh-sync/releases/download/$tag/ssh-sync-setup.exe --submit
shell: powershell


- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: therealpaulgg.ssh-sync
max-versions-to-keep: 5 # keep only latest 5 versions
token: ${{ secrets.ACCESS_TOKEN_CLASSIC }}

0 comments on commit bc617de

Please sign in to comment.