-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (63 loc) · 2.22 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: create release
on:
push:
tags:
- "*.*.*"
jobs:
tests:
uses: ./.github/workflows/tests.yml
secrets: inherit
build:
needs: tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src/Signer/Signer.csproj
- name: set assembly version
run: |
$file = "src\Signer\Properties\AssemblyInfo.cs"
$find = "0.0.0"
$replace = "${{github.ref_name}}"
(Get-Content $file).replace($find, $replace) | Set-Content $file
- name: Build windows-x64
run: |
dotnet publish src/Signer/Signer.csproj -p:PublishProfile=win-x64
- name: Build windows-x86
run: |
dotnet publish src/Signer/Signer.csproj -p:PublishProfile=win-x86
- name: compress files
run: |
Compress-Archive src/Signer/bin/publish-win-x64/Signer.exe src/Signer/bin/publish-win-x64/Signer-win-x64-${{github.ref_name}}.zip
Compress-Archive src/Signer/bin/publish-win-x86/Signer.exe src/Signer/bin/publish-win-x86/Signer-win-x86-${{github.ref_name}}.zip
- uses: actions/upload-artifact@v3
with:
path: src/Signer/bin/publish-win-x64/Signer-win-x64-${{github.ref_name}}.zip
name: Signer-win-x64-${{github.ref_name}}.zip
- uses: actions/upload-artifact@v3
with:
path: src/Signer/bin/publish-win-x86/Signer-win-x86-${{github.ref_name}}.zip
name: Signer-win-x86-${{github.ref_name}}.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: Signer-win-x64-${{github.ref_name}}.zip
- uses: actions/download-artifact@v3
with:
name: Signer-win-x86-${{github.ref_name}}.zip
- name: Release files
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
fail_on_unmatched_files: true
files: |
Signer-win-x64-${{github.ref_name}}.zip
Signer-win-x86-${{github.ref_name}}.zip