Release #5
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
name: Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} for ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: amd64 | |
target: x86_64-unknown-linux-gnu | |
- os: ubuntu-latest | |
arch: arm64 | |
target: aarch64-unknown-linux-gnu | |
# ... other matrix entries ... | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install Dependencies (Ubuntu) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install pkg-config libssl-dev | |
- name: Install Cross-Compilation Tools (ARM64) | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
target: ${{ matrix.target }} | |
- name: Build Binary | |
run: | | |
cd rust | |
cargo build --release --manifest-path=crates/mesc_cli/Cargo.toml --target ${{ matrix.target }} | |
- name: Publish Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
rust/target/${{ matrix.target }}/release/mesc_cli* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |