Skip to content

Workflow file for this run

name: Release CLI Tool
on:
push:
tags:
- 'v*.*.*'
jobs:
build-macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
run: |
rm -rf $HOME/.rustup $HOME/.cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
rustup update
rustup default stable
rustup target add aarch64-apple-darwin
- name: Check if target was added
run: rustup show
- name: Install clang (if missing)
run: |
if ! command -v clang &> /dev/null; then
brew install clang
fi
- name: Build for ARM Mac
run: |
export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=/usr/bin/clang
cargo build --release --target aarch64-apple-darwin
mkdir -p dist
cp target/aarch64-apple-darwin/release/rtyping dist/rtyping-aarch64-apple-darwin
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/rtyping-aarch64-apple-darwin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}