-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.76 KB
/
release.yml
File metadata and controls
68 lines (56 loc) · 1.76 KB
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
name: Release
on:
push:
tags: ['v*']
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
platform: [x64, x86, ARM64]
steps:
- uses: actions/checkout@v4
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build
run: msbuild CheckSums.sln /p:Configuration=Release /p:Platform=${{ matrix.platform }} /nologo /m
- name: Test
if: matrix.platform != 'ARM64'
run: >-
& "${env:ProgramFiles}\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
"build\${{ matrix.platform }}_Release\CheckSumsTest.dll"
/Platform:${{ matrix.platform }}
- name: Stage artifacts
run: |
New-Item -ItemType Directory -Path staging -Force
Copy-Item "build\${{ matrix.platform }}_Release\CheckSums.exe" staging\
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: CheckSums-${{ matrix.platform }}
path: staging\CheckSums.exe
publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Prepare release archives
run: |
for arch in x64 x86 ARM64; do
cd "artifacts/CheckSums-${arch}"
zip "../../CheckSums-${arch}.zip" CheckSums.exe
cd ../..
done
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
CheckSums-x64.zip
CheckSums-x86.zip
CheckSums-ARM64.zip