-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.67 KB
/
github-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
50
51
52
53
name: Publish to GitHub Releases
on:
push:
branches:
- main
tags:
- "v*"
jobs:
publish:
name: Publish for ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: dylib_installer
release_name: dylib_installer-linux-amd64
target: x86_64-unknown-linux-gnu
- os: windows-latest
artifact_name: dylib_installer.exe
release_name: dylib_installer-windows-amd64.exe
target: x86_64-pc-windows-msvc
- os: macos-latest
artifact_name: dylib_installer
release_name: dylib_installer-macos-amd64
target: x86_64-apple-darwin
- os: ubuntu-latest
artifact_name: dylib_installer
release_name: dylib_installer-linux-arm64
target: aarch64-unknown-linux-musl
- os: macos-14
artifact_name: dylib_installer
release_name: dylib_installer-macos-arm64
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v4
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
target: ${{ matrix.target }}
args: --release --target ${{ matrix.target }} --locked --no-default-features
strip: true
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACCESS_TOKEN }}
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.release_name }}
tag: ${{ github.ref }}