-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54afa21
commit 6543035
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
name: pop release | ||
|
||
env: | ||
SUBWASM_VERSION: 0.18.0 | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
@@ -29,18 +32,20 @@ jobs: | |
restore-keys: | | ||
srtool-target-${{ matrix.runtime }}- | ||
srtool-target- | ||
- name: Build ${{ matrix.runtime }} runtime | ||
id: srtool_build | ||
uses: chevdor/[email protected] | ||
env: | ||
BUILD_OPTS: "--features on-chain-release-build -p pop-runtime-${{ matrix.runtime }}" | ||
with: | ||
chain: "pop-runtime-${{ matrix.runtime }}" | ||
chain: ${{ matrix.runtime }} | ||
path: "runtime/${{ matrix.runtime }}" | ||
|
||
- name: Store srtool digest to disk | ||
run: | | ||
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.runtime }}-srtool-digest.json | ||
# Manual trigger: add artifacts to run | ||
- name: Copy artifacts | ||
if: github.event_name != 'release' | ||
|
@@ -52,24 +57,28 @@ jobs: | |
with: | ||
name: ${{ matrix.runtime }}-runtime-${{ github.sha }} | ||
path: | | ||
${{ matrix.chain }}*.wasm | ||
${{ matrix.runtime }}*.wasm | ||
${{ matrix.runtime }}-srtool-digest.json | ||
# We now get extra information thanks to subwasm, | ||
- name: Install subwasm ${{ env.SUBWASM_VERSION }} | ||
run: | | ||
wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb | ||
sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb | ||
subwasm --version | ||
- name: Show Runtime information | ||
run: | | ||
subwasm info ${{ steps.srtool_build.outputs.wasm }} | ||
subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }} | ||
subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime }}-info.json | ||
subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.runtime }}-info_compressed.json | ||
- name: Extract the metadata | ||
run: | | ||
subwasm meta ${{ steps.srtool_build.outputs.wasm }} | ||
subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.runtime }}-metadata.json | ||
- name: Archive Subwasm results | ||
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -79,7 +88,7 @@ jobs: | |
${{ matrix.runtime }}-info.json | ||
${{ matrix.runtime }}-info_compressed.json | ||
${{ matrix.runtime }}-metadata.json | ||
${{ matrix.runtime }}-diff.txt | ||
# Release published: add artifacts to release | ||
- name: Add artifacts to release | ||
if: github.event_name == 'release' | ||
|
@@ -100,7 +109,6 @@ jobs: | |
files: | | ||
${{ steps.srtool_build.outputs.wasm_compressed }} | ||
${{ matrix.runtime }}-srtool-digest.json | ||
build-node: | ||
runs-on: ${{ matrix.platform.os }} | ||
permissions: | ||
|