Skip to content

Commit

Permalink
initial binary release workflow (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
sslivkoff authored Jan 29, 2024
1 parent cd50d84 commit 4686402
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

name: Release

on:
workflow_dispatch:

jobs:
build:
name: Build on ${{ matrix.os }} for ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
arch: [amd64, arm64]
include:
- os: ubuntu-latest
arch: arm64
target: aarch64-unknown-linux-gnu
- os: macos-latest
arch: arm64
target: aarch64-apple-darwin
exclude:
- os: windows-latest
arch: arm64

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Install Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install pkg-config libssl-dev
- 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 --target ${{ matrix.target }} --path crates/mesc_cli
- 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 }}

0 comments on commit 4686402

Please sign in to comment.