-
Notifications
You must be signed in to change notification settings - Fork 28
72 lines (60 loc) · 2.08 KB
/
publish-instant-seal-binary.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
name: Publish Manual Seal Binary
on:
push:
tags:
- '*'
jobs:
build:
name: Publish Manual Seal Binary (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
concurrency:
group: manual-seal-${{ github.ref }}-${{ matrix.os }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Free Disk Space (Ubuntu)
if: matrix.os == 'ubuntu-20.04'
uses: ./.github/actions/free-disk-space
- name: Install toolchain
id: toolchain
uses: actions-rs/toolchain@master
with:
profile: minimal
toolchain: nightly
target: wasm32-unknown-unknown
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install Protobuf (Ubuntu)
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get install protobuf-compiler
- name: Install Protobuf (macOS)
if: matrix.os == 'macos-latest'
run: brew install protobuf
- name: Build binary
run: cargo build --release -p tangle --locked --features testnet,txpool,manual-seal
- name: Calculate SHA256
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
shasum -a 256 target/release/tangle > target/release/tangle.sha256sum
else
sha256sum target/release/tangle > target/release/tangle.sha256sum
fi
- name: Upload manual-seal binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/tangle
asset_name: tangle-testnet-manual-seal-${{ matrix.os == 'macos-latest' && 'darwin' || 'linux' }}-amd64
tag: ${{ github.ref }}
overwrite: true
- name: Upload SHA256 of the binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/tangle.sha256sum
asset_name: tangle-testnet-manual-seal-${{ matrix.os == 'macos-latest' && 'darwin' || 'linux' }}-amd64.sha256sum
tag: ${{ github.ref }}
overwrite: true