-
Notifications
You must be signed in to change notification settings - Fork 7
108 lines (93 loc) · 3.05 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Release
on:
push:
tags:
- 0.*
- 1.*
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: List Keys
run: gpg -K
- name: Build
run: |
cargo build --release
- name: Build bcryptprimitives.rs shim
run: rustc shims/bcryptprimitives.rs -Copt-level=3 -Clto=fat --out-dir target/release
- name: Code Sign
uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.CODE_SIGN_CERTIFICATE }}'
password: '${{ secrets.CODE_SIGN_PASSWORD }}'
recursive: false
files: |
target/release/deucalion.dll
target/release/deucalion_client.exe
target/release/bcryptprimitives.rs
- name: Deucalion SHA256Sum and GPG Sign
run: |
sha256sum target/release/deucalion.dll > deucalion.sha256sum
gpg --output deucalion.sha256sum.asc --clearsign deucalion.sha256sum
cat deucalion.sha256sum.asc
- name: Deucalion Client SHA256Sum and GPG Sign
run: |
sha256sum target/release/deucalion_client.exe > deucalion_client.sha256sum
gpg --output deucalion_client.sha256sum.asc --clearsign deucalion_client.sha256sum
cat deucalion_client.sha256sum.asc
- name: Bcryptprimitives SHA256Sum and GPG Sign
run: |
sha256sum target/release/bcryptprimitives.dll > bcryptprimitives.sha256sum
gpg --output bcryptprimitives.sha256sum.asc --clearsign bcryptprimitives.sha256sum
cat bcryptprimitives.sha256sum.asc
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: deucalion
path: |
target/release/deucalion.dll
target/release/deucalion_client.exe
target/release/bcryptprimitives.dll
deucalion.sha256sum
deucalion.sha256sum.asc
deucalion_client.sha256sum
deucalion_client.sha256sum.asc
bcryptprimitives.sha256sum
bcryptprimitives.sha256sum.asc
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
name: Deucalion ${{ github.ref_name }}
body: "# CHANGELOG"
draft: true
files: |
target/release/deucalion.dll
target/release/deucalion_client.exe
target/release/bcryptprimitives.dll
deucalion.sha256sum
deucalion.sha256sum.asc
deucalion_client.sha256sum
deucalion_client.sha256sum.asc
bcryptprimitives.sha256sum
bcryptprimitives.sha256sum.asc