-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,24 @@ on: | |
push: | ||
tags: | ||
- 'irust@[0-9]+.[0-9]+.[0-9]+' | ||
# Manual trigger | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Tag for release (e.g., [email protected])' | ||
required: true | ||
default: 'test-release' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
name: Release libs | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -23,25 +30,6 @@ jobs: | |
with: | ||
toolchain: stable | ||
|
||
################### | ||
# cross-compile mac aarch64 from linux using zig | ||
- if: runner.os == 'Linux' | ||
uses: goto-bus-stop/setup-zig@v1 | ||
with: | ||
version: 0.10.1 | ||
|
||
- if: runner.os == 'Linux' | ||
name: Install cargo-zigbuild | ||
run: | | ||
cargo install cargo-zigbuild | ||
- if: runner.os == 'Linux' | ||
name: Build MacOS aarch64 binary | ||
run: | | ||
rustup target add aarch64-apple-darwin | ||
cargo zigbuild --release --target aarch64-apple-darwin | ||
################### | ||
|
||
# Build for Musl | ||
- if: runner.os == 'Linux' | ||
name: Build Linux musl binary | ||
|
@@ -57,7 +45,7 @@ jobs: | |
command: build | ||
args: --release | ||
|
||
- if: runner.os == 'MacOS' | ||
- if: matrix.os == 'macos-13' | ||
name: Upload MacOS x86_64 Binary | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
|
@@ -66,11 +54,11 @@ jobs: | |
tag: ${{ github.ref }} | ||
overwrite: true | ||
|
||
- if: runner.os == 'Linux' | ||
name: Upload MacOS aarch64 binary | ||
- if: matrix.os == 'macos-latest' | ||
name: Upload MacOS aarch64 Binary | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: target/aarch64-apple-darwin/release/irust | ||
file: target/release/irust | ||
asset_name: irust-aarch64-apple-darwin | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
|