Skip to content

Commit 5bb8a1c

Browse files
paritytech-release-backport-bot[bot]BDevParityEgorPopelyaev
authored
[stable2509] Backport #10530 (#10776)
Backport #10530 into `stable2509` from BDevParity. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: BDevParity <bruno.devic@parity.io> Co-authored-by: Egor_P <egor@parity.io>
1 parent cc9f43d commit 5bb8a1c

File tree

3 files changed

+176
-2
lines changed

3 files changed

+176
-2
lines changed

.github/workflows/release-41_publish-rpm-package.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,23 @@ on:
99
default: polkadot-stable2412
1010
required: true
1111
type: string
12+
distribution:
13+
description: Distribution where to publish rpm package (release, staging)
14+
default: release
15+
required: true
16+
type: string
17+
18+
workflow_call:
19+
inputs:
20+
tag:
21+
description: Current final release tag in the format polkadot-stableYYMM or polkadot-stable-YYMM-X
22+
required: true
23+
type: string
24+
distribution:
25+
description: Distribution where to publish rpm package (release, staging)
26+
default: release
27+
required: true
28+
type: string
1229

1330
jobs:
1431
call-publish-workflow:
@@ -17,6 +34,6 @@ jobs:
1734
tag: ${{ inputs.tag }}
1835
distribution: ${{ inputs.distribution }}
1936
package_type: 'rpm'
20-
aws_repo_base_path: "s3://releases-package-repos"
37+
aws_repo_base_path: ${{ inputs.distribution == 'release' && 's3://releases-package-repos' || 's3://staging-package-repos' }}
2138
cloudfront_distribution_id: "E36FKEYWDXAZYJ"
2239
secrets: inherit
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Release - Combined Publish Release
2+
3+
# This workflow orchestrates the final release steps by calling workflows in sequence:
4+
# 1. Promote RC to final on S3
5+
# 2. Publish Debian and RPM packages (in parallel)
6+
# 3. Publish Docker images
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
release_tag:
12+
description: Release RC tag in the format polkadot-stableYYMM(-X)-rcX
13+
type: string
14+
required: true
15+
16+
binary:
17+
description: Binary to be released
18+
default: all
19+
type: choice
20+
required: true
21+
options:
22+
- all
23+
- polkadot
24+
- polkadot-parachain
25+
- polkadot-omni-node
26+
- frame-omni-bencher
27+
- chain-spec-builder
28+
29+
registry:
30+
description: Container registry for Docker images
31+
required: true
32+
type: string
33+
default: docker.io
34+
35+
owner:
36+
description: Owner of the container image repo
37+
required: true
38+
type: string
39+
default: parity
40+
41+
version:
42+
description: Version for Docker tags in format v1.16.0
43+
required: true
44+
type: string
45+
46+
distribution:
47+
description: Distribution where to publish rpm package (release, staging)
48+
default: release
49+
required: true
50+
type: string
51+
52+
jobs:
53+
54+
check-synchronization:
55+
uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main
56+
secrets:
57+
fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }}
58+
59+
# ==============================================
60+
# PHASE 1: Promote RC to Final on S3
61+
# ==============================================
62+
promote-rc-to-final:
63+
name: Promote RC to final on S3
64+
needs: [check-synchronization]
65+
if: ${{ needs.check-synchronization.outputs.checks_passed }} == 'true'
66+
uses: ./.github/workflows/release-31_promote-rc-to-final.yml
67+
with:
68+
binary: ${{ inputs.binary }}
69+
release_tag: ${{ inputs.release_tag }}
70+
secrets: inherit
71+
72+
# ==============================================
73+
# PHASE 2: Publish Packages (Debian and RPM)
74+
# ==============================================
75+
publish-deb-package:
76+
name: Publish Debian package
77+
needs: [promote-rc-to-final]
78+
uses: ./.github/workflows/release-40_publish-deb-package.yml
79+
with:
80+
tag: ${{ needs.promote-rc-to-final.outputs.final_tag }}
81+
distribution: release
82+
secrets: inherit
83+
84+
publish-rpm-package:
85+
name: Publish RPM package
86+
needs: [promote-rc-to-final]
87+
uses: ./.github/workflows/release-41_publish-rpm-package.yml
88+
with:
89+
tag: ${{ needs.promote-rc-to-final.outputs.final_tag }}
90+
distribution: ${{ inputs.distribution }}
91+
secrets: inherit
92+
93+
# ==============================================
94+
# PHASE 3: Publish Docker Images
95+
# ==============================================
96+
publish-docker-polkadot:
97+
name: Publish Docker image - polkadot
98+
needs: [promote-rc-to-final, publish-deb-package]
99+
if: ${{ inputs.binary == 'polkadot' || inputs.binary == 'all' }}
100+
uses: ./.github/workflows/release-50_publish-docker.yml
101+
with:
102+
image_type: release
103+
binary: polkadot
104+
registry: ${{ inputs.registry }}
105+
owner: ${{ inputs.owner }}
106+
version: ${{ inputs.version }}
107+
stable_tag: ${{ needs.promote-rc-to-final.outputs.final_tag }}
108+
secrets: inherit
109+
110+
publish-docker-polkadot-parachain:
111+
name: Publish Docker image - polkadot-parachain
112+
# needs: [publish-deb-package, publish-rpm-package]
113+
needs: [promote-rc-to-final]
114+
if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'all' }}
115+
uses: ./.github/workflows/release-50_publish-docker.yml
116+
with:
117+
image_type: release
118+
binary: polkadot-parachain
119+
registry: ${{ inputs.registry }}
120+
owner: ${{ inputs.owner }}
121+
version: ${{ inputs.version }}
122+
stable_tag: ${{ needs.promote-rc-to-final.outputs.final_tag }}
123+
secrets: inherit
124+
125+
publish-docker-polkadot-omni-node:
126+
name: Publish Docker image - polkadot-omni-node
127+
# needs: [publish-deb-package, publish-rpm-package]
128+
needs: [promote-rc-to-final]
129+
if: ${{ inputs.binary == 'polkadot-omni-node' || inputs.binary == 'all' }}
130+
uses: ./.github/workflows/release-50_publish-docker.yml
131+
with:
132+
image_type: release
133+
binary: polkadot-omni-node
134+
registry: ${{ inputs.registry }}
135+
owner: ${{ inputs.owner }}
136+
version: ${{ inputs.version }}
137+
stable_tag: ${{ needs.promote-rc-to-final.outputs.final_tag }}
138+
secrets: inherit
139+
140+
publish-docker-chain-spec-builder:
141+
name: Publish Docker image - chain-spec-builder
142+
# needs: [publish-deb-package, publish-rpm-package]
143+
needs: [promote-rc-to-final]
144+
if: ${{ inputs.binary == 'chain-spec-builder' || inputs.binary == 'all' }}
145+
uses: ./.github/workflows/release-50_publish-docker.yml
146+
with:
147+
image_type: release
148+
binary: chain-spec-builder
149+
registry: ${{ inputs.registry }}
150+
owner: ${{ inputs.owner }}
151+
version: ${{ inputs.version }}
152+
stable_tag: ${{ needs.promote-rc-to-final.outputs.final_tag }}
153+
secrets: inherit

.github/workflows/release-reusable-publish-packages.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,5 +184,9 @@ jobs:
184184
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_RELEASE_ACCESS_KEY_ID }}
185185
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_RELEASE_SECRET_ACCESS_KEY }}
186186
run: |
187-
aws s3 sync "$LOCAL_REPO_PATH" "$AWS_REPO_PATH" --acl public-read
187+
if [[ "${{ inputs.distribution }}" == "release" ]]; then
188+
aws s3 sync "$LOCAL_REPO_PATH" "$AWS_REPO_PATH" --acl public-read
189+
else
190+
aws s3 sync "$LOCAL_REPO_PATH" "$AWS_REPO_PATH"
191+
fi
188192
aws cloudfront create-invalidation --distribution-id ${{ inputs.cloudfront_distribution_id }} --paths '/${{ inputs.package_type }}/*'

0 commit comments

Comments
 (0)