diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c73dcf7..4329302 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,9 +12,9 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@latest - - uses: actions/setup-dotnet@v4 + - uses: actions/setup-dotnet@latest with: dotnet-version: '8.0.x' # SDK Version to use. @@ -35,7 +35,7 @@ jobs: Copy-Item -Path "procgov/bin/release/net8.0-windows/win-x64/publish/procgov.exe" -Destination "artifacts/procgov64.exe" Copy-Item -Path "procgov/bin/release/net8.0-windows/win-x64/publish/procgov.pdb" -Destination "artifacts/procgov64.pdb" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@latest with: name: procgov path: artifacts/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d12c1e..50bae54 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,8 @@ name: release on: push: - tags: - - '*' + tags-ignore: + - 'test-*' jobs: build: @@ -11,16 +11,15 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@latest - - uses: actions/setup-dotnet@v4 + - uses: actions/setup-dotnet@latest with: dotnet-version: '8.0.x' # SDK Version to use. - run: | Invoke-WebRequest -OutFile Update-AssemblyInfoVersionFiles.ps1 https://gist.githubusercontent.com/lowleveldesign/663de4e0d5a071f938e6f7c82d7ca9a0/raw/Update-AssemblyInfoVersionFiles.ps1 ./Update-AssemblyInfoVersionFiles.ps1 - shell: pwsh - run: dotnet test -c release working-directory: ./procgov-tests @@ -39,10 +38,15 @@ jobs: Copy-Item -Path "procgov/bin/release/net8.0-windows/win-x64/publish/procgov.exe" -Destination "artifacts/procgov64.exe" Copy-Item -Path "procgov/bin/release/net8.0-windows/win-x64/publish/procgov.pdb" -Destination "artifacts/procgov64.pdb" - - uses: actions/upload-artifact@v4 + - name: Zip binaries + run: | + Compress-Archive -Path "artifacts/*.exe", "artifacts/*.pdb" -DestinationPath "procgov.zip" + + - uses: marvinpinto/action-automatic-releases@latest with: - name: procgov - path: artifacts/* + repo_token: "${{ secrets.WINGET_GH_TOKEN }}" + prerelease: true + files: procgov.zip - name: Copy the binary to Chocolatey path run: | @@ -58,13 +62,12 @@ jobs: "" >> choco\tools\VERIFICATION.txt "## procgov64.exe" >> choco\tools\VERIFICATION.txt ./Print-FileHashes.ps1 -FilePath choco\tools\procgov64.exe >> choco\tools\VERIFICATION.txt - shell: pwsh - name: Build Chocolatey package run: choco pack working-directory: choco - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@latest with: name: procgov-pkg path: choco\procgov.*.nupkg