Skip to content

Fix srtool build (#790) #44

Fix srtool build (#790)

Fix srtool build (#790) #44

name: Publish Binary
on:
push:
tags:
- '*'
jobs:
build:
name: Publish binaries
runs-on: ubuntu-20.04
strategy:
matrix:
features: [testnet, default, txpool, manual-seal]
steps:
- uses: actions/checkout@v3
- 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
run: sudo apt-get install protobuf-compiler
- name: Build binary
run: cargo build --release -p tangle --locked --features ${{ matrix.features }}
- name: Calculate SHA256
run: sha256sum target/release/tangle > target/release/tangle.sha256sum
- name: Upload ${{ matrix.features }} binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/tangle
asset_name: tangle-${{ matrix.features }}-linux-amd64
tag: ${{ github.ref }}
overwrite: true
- name: Uplaod SHA256 of the binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/tangle.sha256sum
asset_name: tangle-${{ matrix.features }}-linux-amd64.sha256sum
tag: ${{ github.ref }}
overwrite: true