fix(kreivo-runtime): version bump and fix release command to include … #78
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: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Ubuntu dependencies | |
shell: bash | |
run: sudo apt update && sudo apt install -y protobuf-compiler | |
- name: Use Stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
components: rust-src | |
- uses: actions/checkout@v4 | |
- name: Rust Cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
cache-all-crates: true | |
key: build | |
- name: Production build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --profile production --features ${{ contains(github.ref, '-pre') && 'paseo' || 'try-runtime' }} --locked -p kreivo-runtime | |
- name: Upload runtime to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.run_number }}-runtime | |
path: ./target/production/wbuild/kreivo-runtime/kreivo_runtime.compact.compressed.wasm | |
release: | |
name: Publish Release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.run_number }}-runtime | |
- name: Generate release notes | |
env: | |
ENDPOINT: ${{ contains(github.ref, '-pre') && 'testnet.virto.dev' || 'kreivo.io' }} | |
run: | | |
HASH=$(b2sum -l256 kreivo_runtime.compact.compressed.wasm | awk '{print $1}') | |
echo "You can create the \`authorizeUpgrade\` extrinsic [here](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F"$ENDPOINT"#/extrinsics/decode/0x0009"$HASH")." \ | |
>> RELEASE_NOTES.txt | |
- name: Publish Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
prerelease: ${{ contains(github.ref, '-pre') }} | |
body_path: RELEASE_NOTES.txt | |
append_body: true | |
files: | | |
kreivo_runtime.compact.compressed.wasm |