Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/release-10_branchoff-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,18 @@ jobs:

- name: Validate inputs
id: validate_inputs
env:
INPUT_NODE_VERSION: ${{ inputs.node_version }}
INPUT_STABLE_VERSION: ${{ inputs.stable_version }}
run: |
. ./.github/scripts/common/lib.sh

if [ -n "${{ inputs.node_version }}" ]; then
node_version=$(filter_version_from_input "${{ inputs.node_version }}")
if [ -n "$INPUT_NODE_VERSION" ]; then
node_version=$(filter_version_from_input "$INPUT_NODE_VERSION")
echo "node_version=${node_version}" >> $GITHUB_OUTPUT
fi

stable_version=$(validate_stable_tag ${{ inputs.stable_version }})
stable_version=$(validate_stable_tag "$INPUT_STABLE_VERSION")
echo "stable_version=${stable_version}" >> $GITHUB_OUTPUT

create-stable-branch:
Expand Down Expand Up @@ -103,10 +106,10 @@ jobs:
- name: Bump versions, reorder prdocs and push stable branch
env:
GH_TOKEN: ${{ steps.generate_write_token.outputs.token }}
NODE_VERSION: ${{ needs.validate-inputs.outputs.node_version }}
run: |
. ./.github/scripts/release/release_lib.sh

NODE_VERSION="${{ needs.validate-inputs.outputs.node_version }}"
NODE_VERSION_PATTERN="\(NODE_VERSION[^=]*= \)\".*\""
set_version "$NODE_VERSION_PATTERN" $NODE_VERSION "polkadot/node/primitives/src/lib.rs"
commit_with_message "Bump node version to $NODE_VERSION in polkadot-cli"
Expand All @@ -127,12 +130,14 @@ jobs:
if: ${{ inputs.tag_rc }}
env:
GH_TOKEN: ${{ steps.generate_write_token.outputs.token }} # or use a PAT with workflow scope
STABLE_VERSION: ${{ needs.validate-inputs.outputs.stable_version }}
GH_REPOSITORY: ${{ github.repository }}
run: |
stable_tag_base=polkadot-${{ needs.validate-inputs.outputs.stable_version }}
stable_tag_base="polkadot-${STABLE_VERSION}"
gh workflow run release-11_rc-automation.yml \
--repo ${{ github.repository }} \
--ref ${{ needs.validate-inputs.outputs.stable_version }} \
--field version=${stable_tag_base}
--repo "$GH_REPOSITORY" \
--ref "$STABLE_VERSION" \
--field version="${stable_tag_base}"

tag-rc-without-branchoff:
if: ${{ !inputs.is_new_stable && inputs.tag_rc }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-11_rc-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,16 @@ jobs:
# if: ${{ steps.get_rel_product.outputs.product == 'polkadot' }}
id: compute_tag
shell: bash
env:
INPUT_VERSION: ${{ inputs.version }}
run: |
. ./.github/scripts/common/lib.sh

# Get last rc tag if exists, else set it to {version}-rc1
if [[ -z "${{ inputs.version }}" ]]; then
if [[ -z "$INPUT_VERSION" ]]; then
version=v$(get_polkadot_node_version_from_code)
else
version=$(validate_stable_tag ${{ inputs.version }})
version=$(validate_stable_tag "$INPUT_VERSION")
fi
echo "$version"
echo "version=$version" >> $GITHUB_OUTPUT
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-20_build-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ jobs:

- name: Validate inputs
id: validate_inputs
env:
INPUT_RELEASE_TAG: ${{ inputs.release_tag }}
run: |
. ./.github/scripts/common/lib.sh

RELEASE_TAG=$(validate_stable_tag ${{ inputs.release_tag }})
RELEASE_TAG=$(validate_stable_tag "$INPUT_RELEASE_TAG")
echo "release_tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT

build-polkadot-binary:
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/release-21_build-runtimes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Release - Build runtimes

on:
workflow_dispatch:
inputs:
chain:
description: The chain to use
default: all
required: true
type: choice
options:
- all
- westend
- asset-hub-westend
- bridge-hub-westend
- collectives-westend
- coretime-westend
- glutton-westend
- people-westend
runtime_dir:
description: The runtime dir to be used (⚠️ this parameter is optional and needed only in case of the single runtime build, set it accordingly to the runtime you want to build)
default: polkadot/runtime/westend
type: choice
options:
- polkadot/runtime/westend
- cumulus/parachains/runtimes/assets/asset-hub-westend
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend
- cumulus/parachains/runtimes/collectives/collectives-westend
- cumulus/parachains/runtimes/coretime/coretime-westend
- cumulus/parachains/runtimes/people/people-westend
- cumulus/parachains/runtimes/glutton/glutton-westend

release_tag:
description: Tag matching the actual release candidate with the format polkadot-stableYYMM(-X)-rcY or polkadot-stableYYMM(-X)
type: string

workflow_call:
inputs:
chain:
description: The chain to use
default: all
required: true
type: string
runtime_dir:
description: The runtime dir to be used (⚠️ this parameter is optional and needed only in case of the single runtime build, set it accordingly to the runtime you want to build)
default: polkadot/runtime/westend
type: string
release_tag:
description: Tag matching the actual release candidate with the format polkadot-stableYYMM(-X)-rcY or polkadot-stableYYMM(-X)
type: string
outputs:
published_runtimes:
value: ${{ jobs.build-runtimes.outputs.published_runtimes }}

jobs:
check-synchronization:
uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main
secrets:
fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }}

validate-inputs:
needs: [check-synchronization]
if: needs.check-synchronization.outputs.checks_passed == 'true'
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.validate_inputs.outputs.release_tag }}
steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Validate inputs
id: validate_inputs
env:
INPUT_RELEASE_TAG: ${{ inputs.release_tag }}
run: |
. ./.github/scripts/common/lib.sh

RELEASE_TAG=$(validate_stable_tag "$INPUT_RELEASE_TAG")
echo "release_tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT

build-runtimes:
needs: [validate-inputs]
uses: "./.github/workflows/release-srtool.yml"
with:
excluded_runtimes: "rococo asset-hub-rococo bridge-hub-rococo rococo substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template polkadot-sdk-docs-first pallet-staking-async-parachain pallet-staking-async-rc frame-storage-access-test yet-another-parachain revive-dev"
build_opts: "--features on-chain-release-build"
profile: production
chain: ${{ inputs.chain }}
runtime_dir: ${{ inputs.runtime_dir }}
permissions:
id-token: write
attestations: write
contents: read
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Release - Combined Builds Flow

on:
workflow_dispatch:
inputs:
chain:
description: The chain to use for runtime builds
default: all
required: true
type: choice
options:
- all
- westend
- asset-hub-westend
- bridge-hub-westend
- collectives-westend
- coretime-westend
- glutton-westend
- people-westend
runtime_dir:
description: The runtime dir to be used (⚠️ this parameter is optional and needed only in case of the single runtime build, set it accordingly to the runtime you want to build)
default: polkadot/runtime/westend
type: choice
options:
- polkadot/runtime/westend
- cumulus/parachains/runtimes/assets/asset-hub-westend
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend
- cumulus/parachains/runtimes/collectives/collectives-westend
- cumulus/parachains/runtimes/coretime/coretime-westend
- cumulus/parachains/runtimes/people/people-westend
- cumulus/parachains/runtimes/glutton/glutton-westend
binary:
description: Binary to be built for the release candidate
default: all
type: choice
options:
- polkadot
- polkadot-parachain
- polkadot-omni-node
- frame-omni-bencher
- chain-spec-builder
- substrate-node
- eth-rpc
- subkey
- all
release_tag:
description: Tag matching the actual release candidate with the format polkadot-stableYYMM(-X)-rcY or polkadot-stableYYMM(-X)
type: string
required: true
no_runtimes:
description: If true, no runtime build will be triggered and release draft will be published without runtimes (⚠️ use it for the patch releases of the latest stable)
required: true
type: boolean
default: false

jobs:
check-synchronization:
uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main
secrets:
fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }}

validate-inputs:
needs: [check-synchronization]
if: needs.check-synchronization.outputs.checks_passed == 'true'
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.validate_inputs.outputs.release_tag }}
steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Validate inputs
id: validate_inputs
env:
INPUT_RELEASE_TAG: ${{ inputs.release_tag }}
run: |
. ./.github/scripts/common/lib.sh

RELEASE_TAG=$(validate_stable_tag "$INPUT_RELEASE_TAG")
echo "release_tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT

build-runtimes-flow:
if: ${{ inputs.no_runtimes == false }}
needs: [validate-inputs]
uses: "./.github/workflows/release-21_build-runtimes.yml"
with:
chain: ${{ inputs.chain }}
runtime_dir: ${{ inputs.runtime_dir }}
release_tag: ${{ needs.validate-inputs.outputs.release_tag }}
secrets: inherit
permissions:
id-token: write
attestations: write
contents: read

build-rc-flow:
needs: [validate-inputs]
uses: "./.github/workflows/release-20_build-rc.yml"
with:
binary: ${{ inputs.binary }}
release_tag: ${{ needs.validate-inputs.outputs.release_tag }}
secrets: inherit
permissions:
id-token: write
attestations: write
contents: read

trigger-release-draft-with-runtimes:
if: ${{ inputs.no_runtimes == false }}
needs: [build-runtimes-flow, build-rc-flow, validate-inputs]
uses: "./.github/workflows/release-30_publish_release_draft.yml"
with:
release_tag: ${{ needs.validate-inputs.outputs.release_tag }}
build_run_id: ${{ github.run_id }}
runtimes: '${{ needs.build-runtimes-flow.outputs.published_runtimes }}'
no_runtimes: ${{ inputs.no_runtimes }}
crates_only: false
secrets: inherit

trigger-release-draft-without-runtimes:
if: ${{ inputs.no_runtimes == true }}
needs: [build-rc-flow, validate-inputs]
uses: "./.github/workflows/release-30_publish_release_draft.yml"
with:
release_tag: ${{ needs.validate-inputs.outputs.release_tag }}
build_run_id: ${{ github.run_id }}
no_runtimes: ${{ inputs.no_runtimes }}
crates_only: false
secrets: inherit
Loading
Loading