Skip to content

Commit 4e02aa2

Browse files
paritytech-release-backport-bot[bot]BDevParityEgorPopelyaev
authored
[stable2512] Backport #11352 (#11364)
Backport #11352 into `stable2512` 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 29b8f95 commit 4e02aa2

File tree

2 files changed

+26
-29
lines changed

2 files changed

+26
-29
lines changed

.github/workflows/release-60_post-crates-release-activities.yml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@ permissions:
2727
pull-requests: write
2828

2929
jobs:
30-
#check-synchronization:
31-
# uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main
32-
#secrets:
33-
# fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }}
34-
3530
set-image:
36-
#needs: [ check-synchronization ]
37-
#if: needs.check-synchronization.outputs.checks_passed == 'true'
31+
if: ${{ github.event.inputs.version != '' && contains(fromJSON('["nprt", "ArshamTeymouri", "EgorPopelyaev", "alvicsam", "AndWeHaveAPlan", "eduardspa", "BDevParity"]'), github.actor) }}
3832
runs-on: ubuntu-latest
3933
outputs:
4034
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
@@ -291,18 +285,9 @@ jobs:
291285
echo "No changes to commit"
292286
fi
293287
294-
- name: Generate token for paritytech/polkadot-sdk
295-
id: generate_write_token
296-
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
297-
with:
298-
app-id: ${{ vars.POLKADOT_SDK_RELEASE_RW_APP_ID }}
299-
private-key: ${{ secrets.POLKADOT_SDK_RELEASE_RW_APP_KEY }}
300-
owner: paritytech
301-
repositories: polkadot-sdk
302-
303288
- name: Create Pull Request to base release branch
304289
env:
305-
GH_TOKEN: ${{ steps.generate_write_token.outputs.token }}
290+
GH_TOKEN: ${{ github.token }}
306291
BRANCH_NAME: ${{ github.ref_name }}
307292
FULL_RELEASE: ${{ inputs.version }}
308293
GH_REPOSITORY: ${{ github.repository }}
@@ -358,7 +343,7 @@ jobs:
358343
359344
- name: Add comment about spec_version
360345
env:
361-
GH_TOKEN: ${{ steps.generate_write_token.outputs.token }}
346+
GH_TOKEN: ${{ github.token }}
362347
BRANCH_NAME: ${{ github.ref_name }}
363348
GH_REPOSITORY: ${{ github.repository }}
364349
GH_REPOSITORY_OWNER: ${{ github.repository_owner }}

.github/workflows/release-80_publish-crates.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050

5151
publish-crates:
5252
needs: set-image
53-
runs-on: ubuntu-latest
53+
runs-on: ubuntu-latest-m
5454
environment: release
5555
env:
5656
PGP_KMS_KEY: ${{ secrets.PGP_KMS_SIGN_COMMITS_KEY }}
@@ -94,6 +94,7 @@ jobs:
9494
with:
9595
ref: ${{ steps.derive_branch.outputs.STABLE_BRANCH }}
9696
fetch-depth: 0
97+
persist-credentials: false
9798

9899
- name: Import GPG keys
99100
shell: bash
@@ -144,8 +145,8 @@ jobs:
144145

145146
- name: Install parity-publish
146147
run: |
147-
apt-get update && apt-get install -y --no-install-recommends libcurl4-openssl-dev pkg-config
148-
cargo install parity-publish@0.10.10 --locked -q
148+
sudo apt-get update && sudo apt-get install -y --no-install-recommends libcurl4-openssl-dev pkg-config
149+
cargo install parity-publish@0.10.11 --locked -q
149150
150151
- name: Run parity-publish plan
151152
run: |
@@ -227,14 +228,6 @@ jobs:
227228
echo "No changes to commit"
228229
fi
229230
230-
- name: Push release branch
231-
env:
232-
CRATES_RELEASE_BRANCH: ${{ steps.derive_branch.outputs.CRATES_RELEASE_BRANCH }}
233-
run: |
234-
echo "Pushing branch $CRATES_RELEASE_BRANCH..."
235-
git push origin "$CRATES_RELEASE_BRANCH"
236-
echo "Successfully pushed $CRATES_RELEASE_BRANCH"
237-
238231
- name: Configure cargo registry
239232
shell: bash
240233
env:
@@ -272,3 +265,22 @@ jobs:
272265
parity-publish apply -p
273266
echo "Crates published successfully to $REGISTRY!"
274267
fi
268+
269+
- name: Generate token for paritytech/polkadot-sdk
270+
id: generate_write_token
271+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
272+
with:
273+
app-id: ${{ vars.POLKADOT_SDK_RELEASE_RW_APP_ID }}
274+
private-key: ${{ secrets.POLKADOT_SDK_RELEASE_RW_APP_KEY }}
275+
owner: paritytech
276+
repositories: polkadot-sdk
277+
278+
- name: Push release branch to paritytech
279+
env:
280+
CRATES_RELEASE_BRANCH: ${{ steps.derive_branch.outputs.CRATES_RELEASE_BRANCH }}
281+
TOKEN: ${{ steps.generate_write_token.outputs.token }}
282+
run: |
283+
echo "Pushing branch $CRATES_RELEASE_BRANCH to paritytech/polkadot-sdk..."
284+
git remote set-url origin "https://x-access-token:${TOKEN}@github.com/paritytech/polkadot-sdk.git"
285+
git push origin "$CRATES_RELEASE_BRANCH"
286+
echo "Successfully pushed $CRATES_RELEASE_BRANCH to paritytech/polkadot-sdk"

0 commit comments

Comments
 (0)