|
| 1 | +name: Release - Combined Builds Flow |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + chain: |
| 7 | + description: The chain to use for runtime builds |
| 8 | + default: all |
| 9 | + required: true |
| 10 | + type: choice |
| 11 | + options: |
| 12 | + - all |
| 13 | + - westend |
| 14 | + - asset-hub-westend |
| 15 | + - bridge-hub-westend |
| 16 | + - collectives-westend |
| 17 | + - coretime-westend |
| 18 | + - glutton-westend |
| 19 | + - people-westend |
| 20 | + runtime_dir: |
| 21 | + 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) |
| 22 | + default: polkadot/runtime/westend |
| 23 | + type: choice |
| 24 | + options: |
| 25 | + - polkadot/runtime/westend |
| 26 | + - cumulus/parachains/runtimes/assets/asset-hub-westend |
| 27 | + - cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend |
| 28 | + - cumulus/parachains/runtimes/collectives/collectives-westend |
| 29 | + - cumulus/parachains/runtimes/coretime/coretime-westend |
| 30 | + - cumulus/parachains/runtimes/people/people-westend |
| 31 | + - cumulus/parachains/runtimes/glutton/glutton-westend |
| 32 | + binary: |
| 33 | + description: Binary to be built for the release candidate |
| 34 | + default: all |
| 35 | + type: choice |
| 36 | + options: |
| 37 | + - polkadot |
| 38 | + - polkadot-parachain |
| 39 | + - polkadot-omni-node |
| 40 | + - frame-omni-bencher |
| 41 | + - chain-spec-builder |
| 42 | + - substrate-node |
| 43 | + - eth-rpc |
| 44 | + - subkey |
| 45 | + - all |
| 46 | + release_tag: |
| 47 | + description: Tag matching the actual release candidate with the format polkadot-stableYYMM(-X)-rcY or polkadot-stableYYMM(-X) |
| 48 | + type: string |
| 49 | + required: true |
| 50 | + no_runtimes: |
| 51 | + 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) |
| 52 | + required: true |
| 53 | + type: boolean |
| 54 | + default: false |
| 55 | + |
| 56 | +jobs: |
| 57 | + check-synchronization: |
| 58 | + uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main |
| 59 | + secrets: |
| 60 | + fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }} |
| 61 | + |
| 62 | + validate-inputs: |
| 63 | + needs: [check-synchronization] |
| 64 | + if: needs.check-synchronization.outputs.checks_passed == 'true' |
| 65 | + runs-on: ubuntu-latest |
| 66 | + outputs: |
| 67 | + release_tag: ${{ steps.validate_inputs.outputs.release_tag }} |
| 68 | + steps: |
| 69 | + - name: Checkout sources |
| 70 | + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 71 | + |
| 72 | + - name: Validate inputs |
| 73 | + id: validate_inputs |
| 74 | + run: | |
| 75 | + . ./.github/scripts/common/lib.sh |
| 76 | +
|
| 77 | + RELEASE_TAG=$(validate_stable_tag ${{ inputs.release_tag }}) |
| 78 | + echo "release_tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT |
| 79 | +
|
| 80 | + build-runtimes-flow: |
| 81 | + if: ${{ inputs.no_runtimes == false }} |
| 82 | + needs: [validate-inputs] |
| 83 | + uses: "./.github/workflows/release-21_build-runtimes.yml" |
| 84 | + with: |
| 85 | + chain: ${{ inputs.chain }} |
| 86 | + runtime_dir: ${{ inputs.runtime_dir }} |
| 87 | + release_tag: ${{ needs.validate-inputs.outputs.release_tag }} |
| 88 | + secrets: inherit |
| 89 | + permissions: |
| 90 | + id-token: write |
| 91 | + attestations: write |
| 92 | + contents: read |
| 93 | + |
| 94 | + build-rc-flow: |
| 95 | + needs: [validate-inputs] |
| 96 | + uses: "./.github/workflows/release-20_build-rc.yml" |
| 97 | + with: |
| 98 | + binary: ${{ inputs.binary }} |
| 99 | + release_tag: ${{ needs.validate-inputs.outputs.release_tag }} |
| 100 | + secrets: inherit |
| 101 | + permissions: |
| 102 | + id-token: write |
| 103 | + attestations: write |
| 104 | + contents: read |
| 105 | + |
| 106 | + trigger-release-draft-with-runtimes: |
| 107 | + if: ${{ inputs.no_runtimes == false }} |
| 108 | + needs: [build-runtimes-flow, build-rc-flow, validate-inputs] |
| 109 | + uses: "./.github/workflows/release-30_publish_release_draft.yml" |
| 110 | + with: |
| 111 | + release_tag: ${{ needs.validate-inputs.outputs.release_tag }} |
| 112 | + build_run_id: ${{ github.run_id }} |
| 113 | + runtimes: '${{ needs.build-runtimes-flow.outputs.published_runtimes }}' |
| 114 | + no_runtimes: ${{ inputs.no_runtimes }} |
| 115 | + crates_only: false |
| 116 | + secrets: inherit |
| 117 | + |
| 118 | + trigger-release-draft-without-runtimes: |
| 119 | + if: ${{ inputs.no_runtimes == true }} |
| 120 | + needs: [build-rc-flow, validate-inputs] |
| 121 | + uses: "./.github/workflows/release-30_publish_release_draft.yml" |
| 122 | + with: |
| 123 | + release_tag: ${{ needs.validate-inputs.outputs.release_tag }} |
| 124 | + build_run_id: ${{ github.run_id }} |
| 125 | + no_runtimes: ${{ inputs.no_runtimes }} |
| 126 | + crates_only: false |
| 127 | + secrets: inherit |
0 commit comments