-
Notifications
You must be signed in to change notification settings - Fork 18
41 lines (34 loc) · 1.17 KB
/
release-macos-m1.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
name: Release MacOS (M1)
on:
release:
types:
- created
env:
CARGO_TERM_COLOR: always
jobs:
deploy:
name: Deploy for macos (M1)
if: startsWith(github.ref, 'refs/tags')
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [macos-11-m1, macos-12-m1]
include:
- name: macos-11-m1
os: macos-11
artifact_name: matchstick
asset_name: binary-macos-11-m1
- name: macos-12-m1
os: macos-12
artifact_name: matchstick
asset_name: binary-macos-12-m1
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.68.0
- run: brew install protobuf
- name: Build
run: rustup target add aarch64-apple-darwin && cargo build --release --target aarch64-apple-darwin && mv target/aarch64-apple-darwin/release/${{ matrix.artifact_name }} target/release/${{ matrix.asset_name }}
- name: Upload binary to release
run: echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token && gh release upload ${GITHUB_REF##*/} target/release/${{ matrix.asset_name }}