Skip to content

Release Binary

Release Binary #30

Workflow file for this run

name: Release Binary
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-13, macos-latest]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
# Build for Musl
- if: runner.os == 'Linux'
name: Build Linux musl binary
run: |
rustup target add x86_64-unknown-linux-musl
cargo build --release --target=x86_64-unknown-linux-musl
####################################
- name: Build
if: runner.os != 'Linux'
run: cargo build --release
- if: matrix.os == 'macos-13'
name: Upload MacOS x86_64 Binary
uses: svenstaro/upload-release-action@v2
with:
file: target/release/irust
asset_name: irust-x86_64-apple-darwin
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true
- if: matrix.os == 'macos-latest'
name: Upload MacOS aarch64 Binary
uses: svenstaro/upload-release-action@v2
with:
file: target/release/irust
asset_name: irust-aarch64-apple-darwin
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true
- if: runner.os == 'Linux'
name: Upload Linux binary
uses: svenstaro/upload-release-action@v2
with:
file: target/x86_64-unknown-linux-musl/release/irust
asset_name: irust-x86_64-unknown-linux-musl
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true
- if: runner.os == 'Windows'
name: Upload Windows binary
uses: svenstaro/upload-release-action@v2
with:
file: target/release/irust.exe
asset_name: irust-x86_64-pc-windows-msvc.exe
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: true