Skip to content

Commit 89604da

Browse files
Add omni bencher & chain-spec-builder bins to release (#4557)
Closes: #4354 This PR adds the steps to build and attach `frame-omni-bencher` and `chain-spec-builder` binaries to the release draft ## TODO - [x] add also chain-spec-builder binary - [ ] ~~check/investigate Kian's comment: `chain spec builder. Ideally I want it to match the version of the sp-genesis-builder crate`~~ see [comment](#4518 (comment)) - [ ] Backport to `[email protected]` release, so we can use it for next fellows release: polkadot-fellows/runtimes#324 - [ ] Backport to `[email protected]` release --------- Co-authored-by: Branislav Kontur <[email protected]>
1 parent 5f68c93 commit 89604da

File tree

1 file changed

+60
-5
lines changed

1 file changed

+60
-5
lines changed

.github/workflows/release-30_publish_release_draft.yml

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,60 @@ jobs:
2323
echo "stable=$RUST_STABLE_VERSION" >> $GITHUB_OUTPUT
2424
2525
build-runtimes:
26-
uses: "./.github/workflows/srtool.yml"
26+
uses: "./.github/workflows/release-srtool.yml"
2727
with:
2828
excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template"
2929

30+
build-binaries:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
binary: [ frame-omni-bencher, chain-spec-builder ]
35+
steps:
36+
- name: Checkout sources
37+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
38+
39+
- name: Install protobuf-compiler
40+
run: |
41+
sudo apt update
42+
sudo apt install -y protobuf-compiler
43+
44+
- name: Build ${{ matrix.binary }} binary
45+
run: |
46+
if [[ ${{ matrix.binary }} =~ chain-spec-builder ]]; then
47+
cargo build --locked --profile=production -p staging-${{ matrix.binary }} --bin ${{ matrix.binary }}
48+
target/production/${{ matrix.binary }} -h
49+
else
50+
cargo build --locked --profile=production -p ${{ matrix.binary }}
51+
target/production/${{ matrix.binary }} --version
52+
fi
53+
54+
- name: Upload ${{ matrix.binary }} binary
55+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
56+
with:
57+
name: ${{ matrix.binary }}
58+
path: target/production/${{ matrix.binary }}
59+
60+
3061
publish-release-draft:
3162
runs-on: ubuntu-latest
32-
needs: [get-rust-versions, build-runtimes]
63+
needs: [ get-rust-versions, build-runtimes ]
3364
outputs:
3465
release_url: ${{ steps.create-release.outputs.html_url }}
3566
asset_upload_url: ${{ steps.create-release.outputs.upload_url }}
3667
steps:
3768
- name: Checkout
3869
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
3970

71+
- name: Download artifacts
72+
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
73+
4074
- name: Prepare tooling
4175
run: |
4276
URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.4/tera-cli_linux_amd64.deb
4377
wget $URL -O tera.deb
4478
sudo dpkg -i tera.deb
4579
46-
- name: Download artifacts
47-
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
48-
4980
- name: Prepare draft
5081
id: draft
5182
env:
@@ -129,6 +160,30 @@ jobs:
129160
asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm
130161
asset_content_type: application/wasm
131162

163+
publish-binaries:
164+
needs: [ publish-release-draft, build-binaries ]
165+
continue-on-error: true
166+
runs-on: ubuntu-latest
167+
strategy:
168+
matrix:
169+
binary: [frame-omni-bencher, chain-spec-builder]
170+
171+
steps:
172+
- name: Download artifacts
173+
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
174+
with:
175+
name: ${{ matrix.binary }}
176+
177+
- name: Upload ${{ matrix.binary }} binary
178+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2
179+
env:
180+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181+
with:
182+
upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }}
183+
asset_path: ${{ github.workspace}}/${{ matrix.binary }}
184+
asset_name: ${{ matrix.binary }}
185+
asset_content_type: application/octet-stream
186+
132187
post_to_matrix:
133188
runs-on: ubuntu-latest
134189
needs: publish-release-draft

0 commit comments

Comments
 (0)