Skip to content

Commit

Permalink
build(mrml-cli): build on release
Browse files Browse the repository at this point in the history
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
  • Loading branch information
jdrouet committed Feb 29, 2024
1 parent 05f71ff commit 8d01f1a
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/mrml-cli-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: mrml-cli release

on:
release:
types: [created]
workflow_call:
push:
paths:
- ".github/workflows/mrml-cli-release.yml"

jobs:
build-binary:
runs-on: ${{ matrix.runner }}

strategy:
matrix:
include:
- name: linux-amd64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: linux-arm64
runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
# - name: win-amd64
# runner: windows-latest
# target: x86_64-pc-windows-msvc
# - name: macos-amd64
# runner: macos-latest
# target: x86_64-apple-darwin
# - name: macos-arm64
# runner: macos-latest
# target: aarch64-apple-darwin

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: "${{ matrix.target }}"
- name: prepare cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cli-building-${{ hashFiles('**/Cargo.lock') }}
- name: build binary for ${{ matrix.target }}
run: cargo build --verbose --locked --release --target ${{ matrix.target }}

0 comments on commit 8d01f1a

Please sign in to comment.