forked from dfinity/cdk-rs
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (53 loc) · 1.56 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
55
56
57
58
59
60
61
name: Release candid-extractor
on:
push:
tags:
- "candid-extractor-*"
env:
rust-version: 1.65.0
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
binstall_pkg: candid-extractor-x86_64-unknown-linux-gnu.tar.gz
- os: macos-latest
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 }}-release-${{ hashFiles('**/Cargo.toml', 'rust-toolchain.toml') }}
restore-keys: |
${{ runner.os }}-release-
${{ runner.os }}-
- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.rust-version }}
- name: Build
run: |
cargo build -p candid-extractor --release
- 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 }}