-
-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (45 loc) · 1.67 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
name: Release
on:
push:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
jobs:
release:
runs-on: ${{ matrix.os }}
name: ${{ matrix.arg }}
strategy:
fail-fast: false
matrix:
include:
- { os: macos-latest, arg: --mac --x64, target: x86_64-apple-darwin }
- { os: macos-latest, arg: --mac --arm64, target: aarch64-apple-darwin }
- { os: ubuntu-latest, arg: --linux --x64, target: x86_64-unknown-linux-gnu }
# - { os: ubuntu-latest, arg: --linux --arm64, target: aarch64-unknown-linux-gnu }
- { os: windows-latest, arg: --windows --x64, target: x86_64-pc-windows-msvc }
- { os: windows-latest, arg: --windows --arm64, target: aarch64-pc-windows-msvc }
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Node.js setup
uses: actions/setup-node@v2
with:
node-version: 20
- run: npm install
- run: npm run napi -- --target ${{ matrix.target }}
- run: npm run build:web
- run: npm run electron-builder -- ${{ matrix.arg }} --publish always --config.publish.provider github --config.publish.publishAutoUpdate false
env:
GH_TOKEN: ${{ secrets.github_token }}
- run: npm run generate-update-json
# Do not run in parallel - It can cause errors even with --clobber
- name: Upload update.json
if: matrix.target == 'aarch64-apple-darwin'
run: gh release upload ${{ github.ref_name }} build/update.json
env:
GH_TOKEN: ${{ github.token }}