-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into wasm-builder-riscv32emac
- Loading branch information
Showing
6 changed files
with
253 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
name: Release - Promote RC to final candidate on S3 | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
binary: | ||
description: Binary to be build for the release | ||
default: all | ||
type: choice | ||
options: | ||
- polkadot | ||
- polkadot-parachain | ||
- polkadot-omni-node | ||
- frame-omni-bencher | ||
- chain-spec-builder | ||
- all | ||
release_tag: | ||
description: Tag matching the actual release candidate with the format polkadot-stableYYMM(-X)-rcX | ||
type: string | ||
|
||
|
||
jobs: | ||
|
||
check-synchronization: | ||
uses: paritytech-release/sync-workflows/.github/workflows/check-syncronization.yml@main | ||
|
||
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 }} | ||
final_tag: ${{ steps.validate_inputs.outputs.final_tag }} | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Validate inputs | ||
id: validate_inputs | ||
run: | | ||
. ./.github/scripts/common/lib.sh | ||
RELEASE_TAG=$(validate_stable_tag ${{ inputs.release_tag }}) | ||
echo "release_tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT | ||
promote-polkadot-rc-to-final: | ||
if: ${{ inputs.binary == 'polkadot' || inputs.binary == 'all' }} | ||
needs: [ validate-inputs ] | ||
uses: ./.github/workflows/release-reusable-promote-to-final.yml | ||
strategy: | ||
matrix: | ||
target: [ x86_64-unknown-linux-gnu, aarch64-apple-darwin ] | ||
with: | ||
package: polkadot | ||
release_tag: ${{ needs.validate-inputs.outputs.release_tag }} | ||
target: ${{ matrix.target }} | ||
secrets: | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
AWS_RELEASE_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }} | ||
AWS_RELEASE_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }} | ||
|
||
promote-polkadot-parachain-rc-to-final: | ||
if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'all' }} | ||
needs: [ validate-inputs ] | ||
uses: ./.github/workflows/release-reusable-promote-to-final.yml | ||
strategy: | ||
matrix: | ||
target: [ x86_64-unknown-linux-gnu, aarch64-apple-darwin ] | ||
with: | ||
package: polkadot-parachain | ||
release_tag: ${{ needs.validate-inputs.outputs.release_tag }} | ||
target: ${{ matrix.target }} | ||
secrets: | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
AWS_RELEASE_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }} | ||
AWS_RELEASE_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }} | ||
|
||
promote-polkadot-omni-node-rc-to-final: | ||
if: ${{ inputs.binary == 'polkadot-omni-node' || inputs.binary == 'all' }} | ||
needs: [ validate-inputs ] | ||
uses: ./.github/workflows/release-reusable-promote-to-final.yml | ||
strategy: | ||
matrix: | ||
target: [ x86_64-unknown-linux-gnu, aarch64-apple-darwin ] | ||
with: | ||
package: polkadot-omni-node | ||
release_tag: ${{ needs.validate-inputs.outputs.release_tag }} | ||
target: ${{ matrix.target }} | ||
secrets: | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
AWS_RELEASE_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }} | ||
AWS_RELEASE_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }} | ||
|
||
promote-frame-omni-bencher-rc-to-final: | ||
if: ${{ inputs.binary == 'frame-omni-bencher' || inputs.binary == 'all' }} | ||
needs: [ validate-inputs ] | ||
uses: ./.github/workflows/release-reusable-promote-to-final.yml | ||
strategy: | ||
matrix: | ||
target: [ x86_64-unknown-linux-gnu, aarch64-apple-darwin ] | ||
with: | ||
package: frame-omni-bencher | ||
release_tag: ${{ needs.validate-inputs.outputs.release_tag }} | ||
target: ${{ matrix.target }} | ||
secrets: | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
AWS_RELEASE_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }} | ||
AWS_RELEASE_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }} | ||
|
||
promote-chain-spec-builder-rc-to-final: | ||
if: ${{ inputs.binary == 'chain-spec-builder' || inputs.binary == 'all' }} | ||
needs: [ validate-inputs ] | ||
uses: ./.github/workflows/release-reusable-promote-to-final.yml | ||
strategy: | ||
matrix: | ||
target: [ x86_64-unknown-linux-gnu, aarch64-apple-darwin ] | ||
with: | ||
package: chain-spec-builder | ||
release_tag: ${{ needs.validate-inputs.outputs.release_tag }} | ||
target: ${{ matrix.target }} | ||
secrets: | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
AWS_RELEASE_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }} | ||
AWS_RELEASE_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Promote rc to final | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
package: | ||
description: Package to be promoted | ||
required: true | ||
type: string | ||
|
||
release_tag: | ||
description: Tag matching the actual release candidate with the format polkadot-stableYYMM(-X)-rcX taht will be changed to final in form of polkadot-stableYYMM(-X) | ||
required: true | ||
type: string | ||
|
||
target: | ||
description: Target triple for which the artifacts are being uploaded (e.g aarch64-apple-darwin) | ||
required: true | ||
type: string | ||
|
||
secrets: | ||
AWS_DEFAULT_REGION: | ||
required: true | ||
AWS_RELEASE_ACCESS_KEY_ID: | ||
required: true | ||
AWS_RELEASE_SECRET_ACCESS_KEY: | ||
required: true | ||
|
||
jobs: | ||
|
||
promote-release-artifacts: | ||
environment: release | ||
runs-on: ubuntu-latest | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Prepare final tag | ||
id: prepare_final_tag | ||
shell: bash | ||
run: | | ||
tag="$(echo ${{ inputs.release_tag }} | sed 's/-rc[0-9]*$//')" | ||
echo $tag | ||
echo "FINAL_TAG=${tag}" >> $GITHUB_OUTPUT | ||
- name: Fetch binaries from s3 based on version | ||
run: | | ||
. ./.github/scripts/common/lib.sh | ||
VERSION="${{ inputs.release_tag }}" | ||
if [[ ${{ inputs.package }} == 'polkadot' ]]; then | ||
packages=(polkadot polkadot-prepare-worker polkadot-execute-worker) | ||
for package in "${packages[@]}"; do | ||
fetch_release_artifacts_from_s3 $package ${{ inputs.target }} | ||
done | ||
else | ||
fetch_release_artifacts_from_s3 ${{ inputs.package }} ${{ inputs.target }} | ||
fi | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
with: | ||
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
|
||
- name: Upload ${{ inputs.package }} ${{ inputs.target }} artifacts to s3 | ||
run: | | ||
. ./.github/scripts/release/release_lib.sh | ||
if [[ ${{ inputs.package }} == 'polkadot' ]]; then | ||
packages=(polkadot polkadot-prepare-worker polkadot-execute-worker) | ||
for package in "${packages[@]}"; do | ||
upload_s3_release $package ${{ steps.prepare_final_tag.outputs.final_tag }} ${{ inputs.target }} | ||
done | ||
else | ||
upload_s3_release ${{ inputs.package }} ${{ steps.prepare_final_tag.outputs.final_tag }} ${{ inputs.target }} | ||
fi |
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
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