Skip to content

Commit fbbd1ba

Browse files
committed
add arm64 builds
1 parent e048fc7 commit fbbd1ba

File tree

1 file changed

+30
-13
lines changed

1 file changed

+30
-13
lines changed

.github/workflows/release.yaml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,56 @@ jobs:
66
Build:
77
strategy:
88
matrix:
9-
os: [ubuntu-latest, windows-latest, macos-latest, 'ghcr.io/cirruslabs/macos-monterey-xcode:latest']
9+
os:
10+
- ubuntu-latest
11+
- windows-latest
12+
- macos-latest
13+
arch:
14+
- x64
15+
- arm64
16+
1017
runs-on: ${{matrix.os}}
1118
steps:
1219
- name: Checking out Repository
1320
uses: actions/checkout@v3
1421
with:
1522
submodules: true
1623

17-
- name: Installing node
18-
if: ${{runner.os == 'macOS' && runner.arch == 'arm64'}}
19-
uses: actions/setup-node@v3
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
26+
27+
# linux
28+
- name: Install Rust
29+
if: ${{ matrix.os == 'ubuntu-latest' }}
30+
uses: dtolnay/rust-toolchain@master
2031
with:
21-
node-version: 16
32+
toolchain: stable
33+
targets: ${{ matrix.arch == 'arm64' && 'aarch64-unknown-linux-gnu' || 'x86_64-unknown-linux-gnu' }}
2234

23-
- name: Installing yarn
24-
if: ${{runner.os == 'macOS' && runner.arch == 'arm64'}}
25-
run: npm install -g yarn
35+
# macos
36+
- name: Install Rust
37+
if: ${{ matrix.os == 'macos-latest' }}
38+
uses: dtolnay/rust-toolchain@master
39+
with:
40+
toolchain: stable
41+
targets: ${{ matrix.arch == 'arm64' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}
2642

43+
# windows
2744
- name: Install Rust
28-
if: ${{runner.os == 'macOS' && runner.arch == 'arm64'}}
29-
uses: actions-rs/toolchain@v1
45+
if: ${{ matrix.os == 'windows-latest' }}
46+
uses: dtolnay/rust-toolchain@master
3047
with:
3148
toolchain: stable
32-
default: true
49+
targets: ${{ matrix.arch == 'arm64' && 'aarch64-pc-windows-msvc' || 'x86_64-pc-windows-msvc' }}
3350

3451
- name: Building
35-
run: yarn install
52+
run: pnpm install
3653

3754
- name: Uploading
3855
if: ${{github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')}}
3956
uses: actions/upload-artifact@v3
4057
with:
41-
name: bin-${{runner.os}}-${{runner.arch}}
58+
name: bin-${{runner.os}}-${{matrix.arch}}
4259
path: bin/**
4360

4461
Release:

0 commit comments

Comments
 (0)