v0.7.0 #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Take from https://github.com/paritytech/try-runtime-cli/blob/9210f834e654a862a417444e864325fcfc2a63ab/.github/workflows/build-release-binaries.yaml | |
name: Release | |
on: | |
release: | |
types: | |
- created | |
workflow_dispatch: | |
jobs: | |
build_and_upload: | |
strategy: | |
matrix: | |
platform: | |
- { os: ubuntu-latest, target: x86_64-unknown-linux-musl } | |
- { os: macos-latest, target: x86_64-apple-darwin } | |
runs-on: ${{ matrix.platform.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Add target | |
run: rustup target add ${{ matrix.platform.target }} | |
- name: Install deps for musl build | |
if: matrix.platform.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y musl-tools clang build-essential curl llvm-dev libclang-dev linux-headers-generic libsnappy-dev liblz4-dev libzstd-dev libgflags-dev zlib1g-dev libbz2-dev | |
sudo ln -s /usr/bin/g++ /usr/bin/musl-g++ | |
- name: Build | |
run: cargo build --release --target ${{ matrix.platform.target }} | |
- name: Upload Binary to Release | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./target/${{ matrix.platform.target }}/release/collective | |
asset_name: collective-${{ matrix.platform.target }} | |
asset_content_type: application/octet-stream | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |