.github/workflows/release.yml #11
Workflow file for this run
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
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- os_name: Linux-aarch64 | |
os: ubuntu-20.04 | |
target: aarch64-unknown-linux-musl | |
bin: icicle-linux-arm64 | |
- os_name: Linux-x86_64 | |
os: ubuntu-20.04 | |
target: x86_64-unknown-linux-gnu | |
bin: icicle-linux-amd64 | |
- os_name: macOS-x86_64 | |
os: macOS-latest | |
target: x86_64-apple-darwin | |
bin: icicle-darwin-amd64 | |
- os_name: macOS-aarch64 | |
os: macOS-latest | |
target: aarch64-apple-darwin | |
bin: icicle-darwin-arm64 | |
toolchain: | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build binary | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: "build" | |
target: ${{ matrix.platform.target }} | |
toolchain: ${{ matrix.toolchain }} | |
args: "--locked --release" | |
strip: true | |
- name: Rename binary | |
run: mv target/${{ matrix.platform.target }}/release/icicle ${{ matrix.platform.bin }} | |
- name: Generate SHA-256 | |
run: sha256sum -b ${{ matrix.platform.bin }} > ${{ matrix.platform.bin }}.sha256 | |
- name: Release binary and SHA-256 checksum to GitHub | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
${{ matrix.platform.bin }} | |
${{ matrix.platform.bin }}.sha256 |