forked from AleoNet/aleo-setup
-
Notifications
You must be signed in to change notification settings - Fork 64
83 lines (75 loc) · 2.51 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
id-token: write
contents: write
env:
GIT_LFS_SKIP_SMUDGE: 1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
make:
- name: Build Trusted Setup CLI
command: cargo build --release --bin namada-ts --features=cli
cache_key: trusted-setup
cache_version: v1
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup rust toolchain
uses: oxidecomputer/actions-rs_toolchain@ad3f86084a8a5acf2c09cb691421b31cf8af7a36
with:
profile: minimal
override: true
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-anoma-${{ matrix.anoma_cache_version }}-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-anoma-${{ matrix.anoma_cache_version }}-release-
- name: ${{ matrix.make.name }}
run: ${{ matrix.make.command }}
- name: Upload binaries package
uses: actions/upload-artifact@v3
with:
name: release-${{ matrix.os }}-${{ github.sha }}
path: |
target/release/namada-ts
target/release/namada-ts.exe
release:
needs: [build]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- id: get_version
uses: battila7/get-version-action@v2
- name: Download release artifacts
uses: actions/download-artifact@v3
- name: Move binaries
run: |
mv release-macos-latest-${{ github.sha }}/namada-ts namada-ts-macos-${{ steps.get_version.outputs.version }}
mv release-ubuntu-latest-${{ github.sha }}/namada-ts namada-ts-linux-${{ steps.get_version.outputs.version }}
mv release-windows-latest-${{ github.sha }}/namada-ts.exe namada-ts-windows-${{ steps.get_version.outputs.version }}
- name: Create release
uses: softprops/action-gh-release@v1
with:
draft: true
files: ./namada-ts-*-${{ steps.get_version.outputs.version }}
tag_name: ${{ steps.get_version.outputs.version }}
name: Trusted Setup CLI ${{ steps.get_version.outputs.version-without-v }}