Skip to content

Updated README and release action #13

Updated README and release action

Updated README and release action #13

Workflow file for this run

name: release
on:
push:
tags-ignore:
- 'test-*'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.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
# other tests require a desktop environment as they start cmd.exe and winver.exe processes
- run: dotnet test -c release --filter "FullyQualifiedName~ProcessGovernor.Tests.Code.ProgramTests.ParseArgs"
working-directory: ./procgov-tests
- run: dotnet publish -c release -r win-x64
working-directory: ./procgov
- name: Copy artifacts
run: |
New-Item -Type Directory -Path artifacts
Copy-Item -Path "procgov/bin/release/net9.0-windows/win-x64/publish/procgov.exe" -Destination "artifacts/procgov.exe"
Copy-Item -Path "procgov/bin/release/net9.0-windows/win-x64/publish/procgov.pdb" -Destination "artifacts/procgov.pdb"
- name: Zip binaries
run: |
Compress-Archive -Path "artifacts/*.exe", "artifacts/*.pdb" -DestinationPath "procgov.zip"
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.WINGET_GH_TOKEN }}"
prerelease: true
files: procgov.zip
- name: Publish to winget
run: ./winget-publish.ps1
- name: Copy the binary to Chocolatey path
run: |
Copy-Item artifacts\procgov.exe .choco\tools
Copy-Item artifacts\procgov.pdb .choco\tools
- run: |
Invoke-WebRequest -OutFile Print-FileHashes.ps1 https://gist.githubusercontent.com/lowleveldesign/f1afd42662ee8dabe07cf8cbfe25e6a1/raw/Print-FileHashes.ps1
"## procgov.exe" >> .choco\tools\VERIFICATION.txt
./Print-FileHashes.ps1 -FilePath .choco\tools\procgov.exe >> .choco\tools\VERIFICATION.txt
- name: Build Chocolatey package
run: choco pack
working-directory: .choco
- uses: actions/upload-artifact@v4
with:
name: procgov-pkg
path: .choco\procgov.*.nupkg
- name: Release Chocolatey package
run: choco push $(Resolve-Path "procgov.*.nupkg") -s https://push.chocolatey.org/ -k "$env:CHOCO_KEY"
env:
CHOCO_KEY: ${{ secrets.CHOCO_KEY }}
working-directory: .choco