Skip to content

Build, Release, Deploy #5

Build, Release, Deploy

Build, Release, Deploy #5

name: Build and Release
on:
workflow_dispatch:
release:
types: [created] # Trigger when a new release is created
jobs:
release:
name: Build then upload release asset
runs-on: ubuntu-latest
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 cargo-component@0.10.1
- 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@v2
with:
name: wasm-artifact
path: dist/peerpiper_wallet_aggregate.wasm
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/peerpiper_wallet_aggregate.wasm
asset_name: peerpiper_wallet_aggregate.wasm
asset_content_type: application/wasm