Skip to content

Commit

Permalink
GH action - automatic release
Browse files Browse the repository at this point in the history
  • Loading branch information
lowleveldesign committed Apr 11, 2024
1 parent 9896a2e commit 67b67f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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/*
23 changes: 13 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@ name: release

on:
push:
tags:
- '*'
tags-ignore:
- 'test-*'

jobs:
build:

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
Expand All @@ -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: |
Expand All @@ -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
Expand Down

0 comments on commit 67b67f4

Please sign in to comment.