-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 1.95 KB
/
release.yml
File metadata and controls
75 lines (63 loc) · 1.95 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
69
70
71
72
73
74
75
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust (GNU toolchain)
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-gnu
- name: Build
shell: cmd
run: scripts\build.cmd
- name: Run tests
shell: cmd
run: cargo test
- name: Sign executable
uses: azure/trusted-signing-action@v0.5.0
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.TRUSTED_SIGNING_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.TRUSTED_SIGNING_ACCOUNT }}
certificate-profile-name: ${{ secrets.TRUSTED_SIGNING_PROFILE }}
files-folder: build
files-folder-filter: exe
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Package
shell: bash
run: |
mkdir staging
cp build/LockNote.exe staging/
cp README.md staging/
cp LICENSE staging/
cd staging
sha256sum LockNote.exe > SHA256SUMS.txt
7z a ../LockNote-windows-x64.zip .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: LockNote-windows-x64
path: LockNote-windows-x64.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: artifacts/LockNote-windows-x64/LockNote-windows-x64.zip