-
Notifications
You must be signed in to change notification settings - Fork 10
74 lines (62 loc) · 2.06 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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: Release build with runtime-benchmarks
uses: actions-rs/cargo@v1
with:
command: build
args: --profile production --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