-
Notifications
You must be signed in to change notification settings - Fork 18
64 lines (61 loc) · 2.08 KB
/
publish.yaml
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
# Creates and publishes assets for a new release.
# To manually trigger this workflow, create a release in the GitHub UI.
name: "Publish binaries"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
publish-github:
strategy:
# Allowing jobs to fail until 'node-pre-gyp-github' supports failing gracefully if file already exists
# (https://github.com/bchr02/node-pre-gyp-github/issues/42)
fail-fast: false
matrix:
node_version: [18, 19, 20]
system:
- os: macos-12
target: x86_64-apple-darwin
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- os: macos-13-large
target: aarch64-apple-darwin
include:
## ARM64 builds are not working. No ARM64 GitHub Action runners available out of box. Need to nail down cross compile
# - node_version: 16
# system:
# os: macos-latest
# target: aarch64-apple-darwin
- node_version: 17
system:
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
- node_version: 17
system:
os: macos-12
target: x86_64-apple-darwin
runs-on: ${{ matrix.system.os }}
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node_version }}
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.system.target }}
override: true
- name: Install dependencies
working-directory: ./
run: yarn install --ignore-scripts
- name: Compile binary, test, package, and publish to Github release page
env:
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_BUILD_TARGET: ${{ matrix.system.target }}
working-directory: ./
run: yarn build-test-pack-publish