-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 1.02 KB
/
release.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
name: Build and Release Rust Binaries
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-apple-darwin
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install target for aarch64-apple-darwin
run: rustup target add aarch64-apple-darwin
- name: Install target for x86_64-unknown-linux-gnu
run: rustup target add x86_64-unknown-linux-gnu
- name: Build for ${{ matrix.target }}
run: cargo build --release --target ${{ matrix.target }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: target/${{ matrix.target }}/release/notation
asset_name: notation-${{ matrix.target }}
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}