@@ -74,10 +74,12 @@ jobs:
7474
7575 - name : Validate inputs
7676 id : validate_inputs
77+ env :
78+ INPUT_RELEASE_TAG : ${{ inputs.release_tag }}
7779 run : |
7880 . ./.github/scripts/common/lib.sh
7981
80- RELEASE_TAG=$(validate_stable_tag ${{ inputs.release_tag }} )
82+ RELEASE_TAG=$(validate_stable_tag "$INPUT_RELEASE_TAG" )
8183 echo "release_tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT
8284
8385
@@ -106,10 +108,11 @@ jobs:
106108 if : ${{ inputs.no_runtimes == false && inputs.crates_only == false }}
107109 env :
108110 GITHUB_TOKEN : ${{ steps.generate_write_token.outputs.token }}
111+ BUILD_RUN_ID : ${{ inputs.build_run_id }}
109112 run : |
110- mkdir -p ${{ github.workspace}} /runtimes/
111- gh run download ${{ inputs.build_run_id }} --dir ${{ github.workspace}} /runtimes
112- ls -la ${{ github.workspace}} /runtimes
113+ mkdir -p "${GITHUB_WORKSPACE} /runtimes/"
114+ gh run download "$BUILD_RUN_ID" --dir "${GITHUB_WORKSPACE} /runtimes"
115+ ls -la "${GITHUB_WORKSPACE} /runtimes"
113116
114117 - name : Prepare tooling
115118 run : |
@@ -131,6 +134,7 @@ jobs:
131134 RELEASE_TAG : ${{ needs.validate-inputs.outputs.release_tag }}
132135 NO_RUNTIMES : ${{ inputs.no_runtimes }}
133136 CRATES_ONLY : ${{ inputs.crates_only }}
137+ GH_REF_NAME : ${{ github.ref_name }}
134138 shell : bash
135139 run : |
136140 . ./.github/scripts/common/lib.sh
@@ -139,7 +143,7 @@ jobs:
139143
140144 export REF1=$(get_latest_release_tag)
141145 if [[ -z "$RELEASE_TAG" ]]; then
142- export REF2="${{ github.ref_name } }"
146+ export REF2="${GH_REF_NAME }"
143147 echo "REF2: ${REF2}"
144148 else
145149 export REF2="$RELEASE_TAG"
@@ -203,28 +207,32 @@ jobs:
203207 - name : Download runtimes
204208 env :
205209 GITHUB_TOKEN : ${{ steps.generate_write_token.outputs.token }}
210+ BUILD_RUN_ID : ${{ inputs.build_run_id }}
206211 run : |
207- mkdir -p ${{ github.workspace}} /runtimes/
208- gh run download ${{ inputs.build_run_id }} --dir ${{ github.workspace}} /runtimes
209- ls -la ${{ github.workspace}} /runtimes
212+ mkdir -p "${GITHUB_WORKSPACE} /runtimes/"
213+ gh run download "$BUILD_RUN_ID" --dir "${GITHUB_WORKSPACE} /runtimes"
214+ ls -la "${GITHUB_WORKSPACE} /runtimes"
210215
211216 - name : Get runtime info
212217 env :
218+ CHAIN : ${{ matrix.chain }}
213219 JSON : ${{ github.workspace}}/release-notes-context/runtimes/${{ matrix.chain }}-runtime/${{ matrix.chain }}-srtool-digest.json
214220 run : |
215- cd ${{ github.workspace}} /runtimes
216- >>$GITHUB_ENV echo ASSET=$(find ${{ matrix.chain }} -runtime -name '*.compact.compressed.wasm')
221+ cd "${GITHUB_WORKSPACE} /runtimes"
222+ >>$GITHUB_ENV echo ASSET=$(find "${CHAIN} -runtime" -name '*.compact.compressed.wasm')
217223 >>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion)
218224
219225 - name : Upload compressed ${{ matrix.chain }} v${{ env.SPEC }} wasm
220226 working-directory : ${{ github.workspace}}/runtimes
221227 env :
222228 GITHUB_TOKEN : ${{ steps.generate_write_token.outputs.token }}
229+ CHAIN : ${{ matrix.chain }}
230+ VALIDATED_RELEASE_TAG : ${{ needs.validate-inputs.outputs.release_tag }}
223231 run : |
224- VERSIONED_ASSET="${{ matrix.chain } }_runtime-v${{ env.SPEC }}.compact.compressed.wasm"
232+ VERSIONED_ASSET="${CHAIN }_runtime-v${{ env.SPEC }}.compact.compressed.wasm"
225233 mv "${{ env.ASSET }}" "$VERSIONED_ASSET"
226234
227- gh release upload ${{ needs.validate-inputs.outputs.release_tag }} \
235+ gh release upload "$VALIDATED_RELEASE_TAG" \
228236 --repo paritytech/polkadot-sdk "$VERSIONED_ASSET"
229237
230238 publish-release-artifacts :
@@ -243,23 +251,28 @@ jobs:
243251 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
244252
245253 - name : Fetch binaries from s3 based on version
254+ env :
255+ VERSION : ${{ needs.validate-inputs.outputs.release_tag }}
256+ BINARY : ${{ matrix.binary }}
257+ TARGET : ${{ matrix.target }}
246258 run : |
247259 . ./.github/scripts/common/lib.sh
248260
249- VERSION="${{ needs.validate-inputs.outputs.release_tag }}"
250- fetch_release_artifacts_from_s3 ${{ matrix.binary }} ${{ matrix.target }}
261+ fetch_release_artifacts_from_s3 "$BINARY" "$TARGET"
251262
252263 - name : Rename aarch64-apple-darwin binaries
253264 if : ${{ matrix.target == 'aarch64-apple-darwin' }}
254265 working-directory : ${{ github.workspace}}/release-artifacts/${{ matrix.target }}/${{ matrix.binary }}
266+ env :
267+ BINARY : ${{ matrix.binary }}
255268 run : |
256269 . ../../../.github/scripts/common/lib.sh
257270
258- mv ${{ matrix.binary }} ${{ matrix.binary }} -aarch64-apple-darwin
259- mv ${{ matrix.binary }} .asc ${{ matrix.binary }} -aarch64-apple-darwin.asc
271+ mv "$BINARY" "${BINARY} -aarch64-apple-darwin"
272+ mv "${BINARY} .asc" "${BINARY} -aarch64-apple-darwin.asc"
260273
261- sha256sum "${{ matrix.binary }} -aarch64-apple-darwin" | tee "${{ matrix.binary } }-aarch64-apple-darwin.sha256"
262- check_sha256 "${{ matrix.binary } }-aarch64-apple-darwin" && echo "OK" || echo "ERR"
274+ sha256sum "${BINARY} -aarch64-apple-darwin" | tee "${BINARY }-aarch64-apple-darwin.sha256"
275+ check_sha256 "${BINARY }-aarch64-apple-darwin" && echo "OK" || echo "ERR"
263276
264277 - name : Generate content write token for the release automation
265278 id : generate_write_token
@@ -273,20 +286,23 @@ jobs:
273286 - name : Upload ${{ matrix.binary }} binary to release draft
274287 env :
275288 GITHUB_TOKEN : ${{ steps.generate_write_token.outputs.token }}
289+ BINARY : ${{ matrix.binary }}
290+ TARGET : ${{ matrix.target }}
291+ VALIDATED_RELEASE_TAG : ${{ needs.validate-inputs.outputs.release_tag }}
276292 working-directory : ${{ github.workspace}}/release-artifacts/${{ matrix.target }}/${{ matrix.binary }}
277293 run : |
278- if [[ ${{ matrix.target }} == "aarch64-apple-darwin" ]]; then
279- gh release upload ${{ needs.validate-inputs.outputs.release_tag }} \
294+ if [[ "$TARGET" == "aarch64-apple-darwin" ]]; then
295+ gh release upload "$VALIDATED_RELEASE_TAG" \
280296 --repo paritytech/polkadot-sdk \
281- ${{ matrix.binary }} -aarch64-apple-darwin \
282- ${{ matrix.binary }} -aarch64-apple-darwin.asc \
283- ${{ matrix.binary }} -aarch64-apple-darwin.sha256
297+ "${BINARY} -aarch64-apple-darwin" \
298+ "${BINARY} -aarch64-apple-darwin.asc" \
299+ "${BINARY} -aarch64-apple-darwin.sha256"
284300 else
285- gh release upload ${{ needs.validate-inputs.outputs.release_tag }} \
301+ gh release upload "$VALIDATED_RELEASE_TAG" \
286302 --repo paritytech/polkadot-sdk \
287- ${{ matrix.binary }} \
288- ${{ matrix.binary }} .asc \
289- ${{ matrix.binary }} .sha256
303+ "$BINARY" \
304+ "${BINARY} .asc" \
305+ "${BINARY} .sha256"
290306 fi
291307
292308 post_to_matrix :
0 commit comments