fix(ci): runtime artifact name separation (#1006) #3
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: Build runtime artifacts | |
on: | |
push: | |
branches: | |
- "ci/runtime/**" | |
jobs: | |
set-tags: | |
name: Get & set tags | |
runs-on: ubuntu-latest | |
outputs: | |
commit_hash: ${{ steps.get-sha.outputs.sha }} | |
commit_hash8: ${{ steps.get-sha.outputs.sha8 }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get SHA | |
id: get-sha | |
run: | | |
sha=$(git log -1 --format='%H') | |
echo "sha=$sha" >> $GITHUB_OUTPUT | |
echo "sha8=$(git log -1 --format='%H' | cut -c1-8)" >> $GITHUB_OUTPUT | |
echo "SHA commit:" $sha | |
build-runtime: | |
name: Build runtimes | |
needs: ["set-tags"] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Name denotes the artifact name in the workflow run | |
- name: testnet | |
chain: timechain | |
features: default | |
- name: development | |
chain: timechain | |
features: development | |
steps: | |
- name: Fetch latest code | |
uses: actions/checkout@v3 | |
- name: Build timechain runtime | |
id: srtool_build | |
uses: chevdor/[email protected] | |
env: | |
BUILD_OPTS: --features ${{ matrix.features }} | |
with: | |
image: analoglabs/srtool | |
tag: 1.75.0 | |
chain: ${{ matrix.chain }} | |
runtime_dir: "runtime" | |
- name: Srtool summary | |
run: | | |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > timechain-srtool-digest.json | |
cat timechain-srtool-digest.json | |
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm_compressed }}" | |
- name: Upload timechain runtime artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }}-runtime | |
if-no-files-found: error | |
path: | | |
${{ steps.srtool_build.outputs.wasm_compressed }} | |
timechain-srtool-digest.json |