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 f464179
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: release

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

jobs:
build:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: test-release

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

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x' # SDK Version to use.

- run: dotnet test -c release
working-directory: ./procgov-tests

- run: dotnet publish -c release -r win-x86 --self-contained
working-directory: ./procgov

- run: dotnet publish -c release -r win-x64 --self-contained
working-directory: ./procgov

- name: Copy artifacts
run: |
New-Item -Type Directory -Path artifacts
Copy-Item -Path "procgov/bin/release/net8.0-windows/win-x86/publish/procgov.exe" -Destination "artifacts/procgov32.exe"
Copy-Item -Path "procgov/bin/release/net8.0-windows/win-x86/publish/procgov.pdb" -Destination "artifacts/procgov32.pdb"
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
with:
name: procgov
path: artifacts/*

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.WINGET_GH_TOKEN }}"
prerelease: true
files: |
artifacts/*

0 comments on commit f464179

Please sign in to comment.