Skip to content

Commit 371590d

Browse files
committed
Add publish action
Which automatically publishes the build artefacts of tagged releases.
1 parent 3089f54 commit 371590d

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/dotnet-desktop.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: .NET Desktop
33
on:
44
push:
55
branches: [ "main" ]
6+
tags:
7+
- "v*"
68
pull_request:
79
branches: [ "main" ]
810

@@ -42,10 +44,23 @@ jobs:
4244

4345
# Build the application
4446
- name: Build the application
45-
run: dotnet build --no-restore
47+
run: dotnet build --no-restore --property WarningLevel=0
4648
env:
4749
Configuration: ${{ matrix.configuration }}
4850

4951
# Execute all unit tests in the solution
5052
- name: Execute unit tests
5153
run: dotnet test
54+
55+
- name: Generate archive
56+
run: |
57+
Compress-Archive -Path FancyWM/bin/${{ matrix.configuration }}/net6.0-windows10.0.18362.0/*.* -DestinationPath ${{ matrix.configuration }}.zip
58+
(Get-FileHash ${{ matrix.configuration }}.zip -Algorithm SHA256).Hash | Out-File ${{ matrix.configuration }}.zip.sha256sum
59+
60+
- name: Release
61+
uses: softprops/action-gh-release@v1
62+
if: startsWith(github.ref, 'refs/tags/')
63+
with:
64+
files: |
65+
${{ matrix.configuration }}.zip
66+
${{ matrix.configuration }}.zip.sha256sum

0 commit comments

Comments
 (0)