Skip to content

Commit 4686402

Browse files
authored
initial binary release workflow (paradigmxyz#17)
1 parent cd50d84 commit 4686402

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
name: Release
3+
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Build on ${{ matrix.os }} for ${{ matrix.arch }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
arch: [amd64, arm64]
15+
include:
16+
- os: ubuntu-latest
17+
arch: arm64
18+
target: aarch64-unknown-linux-gnu
19+
- os: macos-latest
20+
arch: arm64
21+
target: aarch64-apple-darwin
22+
exclude:
23+
- os: windows-latest
24+
arch: arm64
25+
26+
steps:
27+
- name: Checkout Repository
28+
uses: actions/checkout@v2
29+
30+
- name: Install Dependencies (Ubuntu)
31+
if: matrix.os == 'ubuntu-latest'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install pkg-config libssl-dev
35+
36+
- name: Install Rust
37+
uses: actions-rs/toolchain@v1
38+
with:
39+
toolchain: stable
40+
profile: minimal
41+
override: true
42+
target: ${{ matrix.target }}
43+
44+
- name: Build Binary
45+
run: |
46+
cd rust
47+
cargo build --release --target ${{ matrix.target }} --path crates/mesc_cli
48+
49+
- name: Publish Release
50+
if: startsWith(github.ref, 'refs/tags/')
51+
uses: softprops/action-gh-release@v1
52+
with:
53+
files: |
54+
rust/target/${{ matrix.target }}/release/mesc_cli*
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+

0 commit comments

Comments
 (0)