Build, Release, Deploy #9
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 Release | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] # Trigger when a new release is created | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
release: | |
name: Build then upload release asset | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Install Binstall | |
uses: cargo-bins/cargo-binstall@main | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: wasm32-unknown-unknown, wasm32-wasi | |
toolchain: nightly-x86_64-unknown-linux-gnu | |
components: rust-src, rustfmt | |
- name: Install cargo component | |
run: echo yes | cargo binstall [email protected] | |
- name: Run binstall just, wasm-tools | |
run: | | |
# Run binstall just with the --no-confirm flag | |
cargo binstall just --no-confirm | |
cargo install wasm-tools | |
- name: Build and Compose Wasm | |
run: | | |
just build-submodules | |
just compose | |
- name: Archive build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wasm-artifact | |
path: dist/peerpiper_wallet_aggregate.wasm | |
- name: Upload Release Asset | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: dist/peerpiper_wallet_aggregate.wasm | |
tag_name: prerelease | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |