-
Notifications
You must be signed in to change notification settings - Fork 20
78 lines (73 loc) · 2.41 KB
/
deploy.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
name: Publish Analog SDK
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
release:
strategy:
matrix:
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: win-signing
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Build Environment
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install libudev-dev libhidapi-dev
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
override: true
default: true
target: ${{ matrix.target }}
- uses: davidB/rust-cargo-make@v1
- uses: Swatinem/rust-cache@v1
with:
sharedKey: ${{ matrix.target }}
- name: Run deploy script
shell: bash
# Signing key env is required for signing dll's on windows
env:
TIMESTAMP: ${{secrets.WIN_EV_CSC_TIMESTAMP}}
CERT_FILE: ${{secrets.WIN_EV_CSC_CERT_FILE}}
CRYPT_PROVIDER: ${{secrets.WIN_EV_CSC_CRYPT_PROVIDER}}
READER: ${{secrets.WIN_EV_CSC_READER}}
PASS: ${{secrets.WIN_EV_CSC_PASS}}
CONTAINER: ${{secrets.WIN_EV_CSC_CONTAINER}}
run: sh ci/before_deploy.sh
- name: Build Windows Installer
shell: bash
if: runner.os == 'Windows'
env:
TIMESTAMP: ${{secrets.WIN_EV_CSC_TIMESTAMP}}
CERT_FILE: ${{secrets.WIN_EV_CSC_CERT_FILE}}
CRYPT_PROVIDER: ${{secrets.WIN_EV_CSC_CRYPT_PROVIDER}}
READER: ${{secrets.WIN_EV_CSC_READER}}
PASS: ${{secrets.WIN_EV_CSC_PASS}}
CONTAINER: ${{secrets.WIN_EV_CSC_CONTAINER}}
run: cargo make --cwd wooting-analog-sdk sign-win-installer -- --target $TARGET
- name: Build debian package
if: startsWith(matrix.os, 'ubuntu')
run: cargo make --cwd wooting-analog-sdk build-deb -- --target $TARGET
- name: Upload artifacts to release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
target/wix/*.msi
target/debian/*.deb
*.tar.gz