-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (55 loc) · 1.76 KB
/
cmake-publish.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
name: Publish Main Release
on:
release:
types: [published]
jobs:
release:
name: Release
strategy:
matrix:
kind: ['x64-Release', 'x86-Release', 'ARM64-Release']
include:
- kind: x64-Release
config: Release
arch: x64
archalias: x64
- kind: x86-Release
config: Release
arch: x86
archalias: Win32
- kind: ARM64-Release
config: Release
arch: ARM64
archalias: ARM64
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Download Certificate
run: |
echo $env:CODESIGN_CERT > "$env:TEMP\signcert.txt"
certutil -decode -f "$env:TEMP\signcert.txt" "$env:TEMP\signcert.pfx"
env:
CODESIGN_CERT: ${{ secrets.CODESIGN_CERT }}
- name: Setup Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Build projects with CMake
run: |
cmake -Sbuildenv -Bbuild\Cmake-${{ matrix.config }}-${{ matrix.arch }} -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DSIGNER_CERT:STRING="$env:TEMP\signcert.pfx" -DSIGNER_PASS:STRING=$env:CODESIGN_PW -T host=x64 -A ${{ matrix.archalias }}
cmake --build build\Cmake-${{ matrix.config }}-${{ matrix.arch }} --config ${{ matrix.config }} --target WinPinMenu-package-inst
env:
CODESIGN_PW: ${{ secrets.CODESIGN_PW }}
- name: Publish to GitHub
uses: softprops/action-gh-release@v2
with:
files: |
distr/*.exe
distr/*.zip
distr/*.sha256
env:
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: Cleanup
if: always()
continue-on-error: true
run: |
del "$env:TEMP\signcert.*"