Release - Publish draft #25
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: Release - Publish draft | |
on: | |
# push: | |
# tags: | |
# # Catches v1.2.3 and v1.2.3-rc1 | |
# - v[0-9]+.[0-9]+.[0-9]+* | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Current release version as a number | |
default: v1.9.0 | |
required: true | |
jobs: | |
get-rust-versions: | |
runs-on: ubuntu-latest | |
container: | |
image: paritytech/ci-unified:bullseye-1.75.0-2024-01-22-v20240109 | |
outputs: | |
rustc-stable: ${{ steps.get-rust-versions.outputs.stable }} | |
rustc-nightly: ${{ steps.get-rust-versions.outputs.nightly }} | |
steps: | |
- id: get-rust-versions | |
run: | | |
echo "stable=$(rustc +stable --version)" >> $GITHUB_OUTPUT | |
echo "nightly=$(rustc +nightly --version)" >> $GITHUB_OUTPUT | |
build-runtimes: | |
uses: "./.github/workflows/srtool.yml" | |
with: | |
excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template" | |
publish-darft-release: | |
runs-on: ubuntu-latest | |
needs: [get-rust-versions, build-runtimes] | |
outputs: | |
release_url: ${{ steps.create-release.outputs.html_url }} | |
asset_upload_url: ${{ steps.create-release.outputs.upload_url }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- name: Prepare tooling | |
run: | | |
URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.4/tera-cli_linux_amd64.deb | |
wget $URL -O tera.deb | |
sudo dpkg -i tera.deb | |
tera --version | |
- name: Download artifacts | |
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | |
- name: Display structure of downloaded files | |
run: pwd; ls -la | |
- name: Prepare draft | |
id: draft | |
env: | |
VERSION: ${{ inputs.version }} | |
RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }} | |
RUSTC_NIGHTLY: ${{ needs.get-rust-versions.outputs.rustc-nightly }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ASSET_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/asset-hub-rococo-runtime/asset-hub-rococo-srtool-digest.json' | |
ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json' | |
BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-runtime/bridge-hub-rococo-srtool-digest.json' | |
BRIDGE_HUB_WESTEND_DIGEST: ${{ github.workspace}}/bridge-hub-westend-runtime/bridge-hub-westend-srtool-digest.json' | |
COLLECTIVES_WESTEND_DIGEST: ${{ github.workspace}}/collectives-westend-runtime/collectives-westend-srtool-digest.json' | |
CONTRACTS_ROCOCO_DIGEST: ${{ github.workspace}}/contracts-rococo-runtime/contracts-rococo-srtool-digest.json' | |
CORETIME_ROCOCO_DIGEST: ${{ github.workspace}}/coretime-rococo-runtime/coretime-rococo-srtool-digest.json' | |
CORETIME_WESTEND_DIGEST: ${{ github.workspace}}/coretime-westend-runtime/coretime-westend-srtool-digest.json' | |
GLUTTON_WESTEND_DIGEST: ${{ github.workspace}}/glutton-westend-runtime/glutton-westend-srtool-digest.json' | |
PEOPLE_ROCOCO_DIGEST: ${{ github.workspace}}/people-rococo-runtime/people-rococo-srtool-digest.json' | |
PEOPLE_WESTEND_DIGEST: ${{ github.workspace}}/people-westend-runtime/people-westend-srtool-digest.json' | |
ROCOCO_DIGEST: ${{ github.workspace}}/rococo-runtime/rococo-srtool-digest.json' | |
WESTEND_DIGEST: ${{ github.workspace}}/westend-runtime/westend-srtool-digest.json' | |
run: | | |
find ${{env.GITHUB_WORKSPACE}} -type f -name "*_srtool_output.json" | |
ls -al $ASSET_HUB_ROCOCO_DIGEST | |
ls -al $ASSET_HUB_WESTEND_DIGEST | |
ls -al $BRIDGE_HUB_ROCOCO_DIGEST | |
ls -al $BRIDGE_HUB_WESTEND_DIGEST | |
ls -al $COLLECTIVES_WESTEND_DIGEST | |
. ./.github/scripts/common/lib.sh | |
export REF1=$(get_latest_release_tag) | |
export REF2=$VERSION | |
export VERSION=$(echo "$VERSION" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') | |
./scripts/release/build-changelogs.sh | |
echo "Checking the folder state" | |
pwd | |
ls -la | |
- name: Archive artifact context.json | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: release-notes-context | |
path: | | |
scripts/release/context.json | |
**/*_srtool_output.json | |
- name: Create draft release | |
id: create-release | |
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REF: ${{ inputs.version }} | |
with: | |
tag_name: ${{ env.REF }} | |
release_name: Polkadot ${{ env.REF}} | |
body_path: ./polkadot-sdk/scripts/release/RELEASE_DRAFT.md | |
draft: true |