Build and publish #5
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
name: Build and publish | |
on: | |
push: | |
tags: 'v*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Rust toolchain | |
run: | | |
rustup set profile minimal | |
rustup show | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
version: 3.20.1 | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build runtime | |
run: | | |
cargo build --release --timings --package node-subspace-runtime | |
export SHA256SUM=$(sha256sum target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm | cut -d ' ' -f1) | |
echo Hash of compact and compressed WASM: $SHA256SUM | |
mkdir out | |
mv target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm out/ | |
touch out/$SHA256SUM | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: node_subspace_runtime.compact.compressed | |
path: out/ | |
if-no-files-found: error | |
overwrite: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: node-subspace-runtime-timings | |
path: target/cargo-timings/cargo-timing.html | |
overwrite: true |