-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (47 loc) · 1.59 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
name: Build and Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
name: Build and Release ${{ matrix.platform.target }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
- target: x86_64-apple-darwin
os: macOS-latest
- target: aarch64-apple-darwin
os: macOS-latest
steps:
- uses: actions/checkout@v3
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
target: ${{ matrix.platform.target }}
toolchain: stable
args: "--locked --release"
strip: true
- name: Generate SHA-256
run: shasum -a 256 target/${{ matrix.platform.target }}/release/clparse | cut -d ' ' -f 1 > target/${{ matrix.platform.target }}/release/clparse.sha256
- name: Create release archive
uses: a7ul/[email protected]
with:
command: c
cwd: target/${{ matrix.platform.target }}/release
files: |
clparse
outPath: clparse-${{ github.ref }}-${{ matrix.platform.target }}.tar.gz
- name: Release binary and SHA-256 checksum to GitHub
uses: softprops/action-gh-release@v1
with:
files: |
target/${{ matrix.platform.target }}/release/clparse-${{ github.ref }}-${{ matrix.platform.target }}.tar.gz
target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}.sha256