-
Notifications
You must be signed in to change notification settings - Fork 90
54 lines (49 loc) · 1.58 KB
/
release-candid-extractor.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: Release candid-extractor
on:
push:
tags:
- "candid-extractor-*"
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# The indirect dependency `zstd-safe` (introduced by `wasmtime`) needs higher version of GLIBC.
# using ubuntu-20.04 will fail to compile
- os: ubuntu-22.04
binstall_pkg: candid-extractor-x86_64-unknown-linux-gnu.tar.gz
- os: macos-12
binstall_pkg: candid-extractor-x86_64-apple-darwin.tar.gz
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-candid-extractor-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-candid-extractor-
${{ runner.os }}-
- name: Build
run: |
cargo build -p candid-extractor --release --locked
- name: Bundle
run: |
cp target/release/candid-extractor .
chmod +x candid-extractor
tar -cvzf ${{ matrix.binstall_pkg }} candid-extractor
- name: Upload release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.binstall_pkg }}
asset_name: ${{ matrix.binstall_pkg }}
tag: ${{ github.ref }}