forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust sync templates flow to use new release branch (paritytech#5182)
As the release branch name changed starting from this release, this PR adds it to the sync templates flow so that checkout step worked properly. --------- Co-authored-by: rzadp <[email protected]>
- Loading branch information
1 parent
7d0aa89
commit 6a5b6e0
Showing
1 changed file
with
9 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,10 @@ on: | |
# A manual dispatch for now - automatic on releases later. | ||
workflow_dispatch: | ||
inputs: | ||
crate_release_version: | ||
description: 'A release version to use, e.g. 1.9.0' | ||
stable_release_branch: | ||
description: 'Stable release branch, e.g. stable2407' | ||
required: true | ||
|
||
|
||
jobs: | ||
sync-templates: | ||
runs-on: ubuntu-latest | ||
|
@@ -44,7 +43,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
path: polkadot-sdk | ||
ref: "release-crates-io-v${{ github.event.inputs.crate_release_version }}" | ||
ref: "${{ github.event.inputs.stable_release_branch }}" | ||
- name: Generate a token for the template repository | ||
id: app_token | ||
uses: actions/[email protected] | ||
|
@@ -72,8 +71,8 @@ jobs: | |
# 2. Yanking the template out of the monorepo workspace. | ||
|
||
- name: Use psvm to replace git references with released creates. | ||
run: find . -type f -name 'Cargo.toml' -exec psvm -o -v ${{ github.event.inputs.crate_release_version }} -p {} \; | ||
- name: Replace dev-dependencies path references with workspace references | ||
run: find . -type f -name 'Cargo.toml' -exec sed -i'' -E "s/path = \"\.\.\/.*\"/workspace = true/g" {} \; | ||
working-directory: polkadot-sdk/templates/${{ matrix.template }}/ | ||
- name: Create a new workspace Cargo.toml | ||
run: | | ||
|
@@ -123,7 +122,7 @@ jobs: | |
cp -r polkadot-sdk/templates/${{ matrix.template }}/* "${{ env.template-path }}/" | ||
- name: Run psvm on monorepo workspace dependencies | ||
run: psvm -o -v ${{ github.event.inputs.crate_release_version }} -p ./Cargo.toml | ||
run: psvm -o -v ${{ github.event.inputs.stable_release_branch }} -p ./Cargo.toml | ||
working-directory: polkadot-sdk/ | ||
- name: Copy over required workspace dependencies | ||
run: | | ||
|
@@ -164,12 +163,12 @@ jobs: | |
token: ${{ steps.app_token.outputs.token }} | ||
add-paths: | | ||
./* | ||
title: "[Don't merge] Update the ${{ matrix.template }} template to ${{ github.event.inputs.crate_release_version }}" | ||
title: "[Don't merge] Update the ${{ matrix.template }} template to ${{ github.event.inputs.stable_release_branch }}" | ||
body: "The template has NOT been successfully built and needs to be inspected." | ||
branch: "update-template/${{ github.event.inputs.crate_release_version }}" | ||
branch: "update-template/${{ github.event.inputs.stable_release_branch }}" | ||
- name: Push changes | ||
run: | | ||
git add -A . | ||
git commit --allow-empty -m "Update to ${{ github.event.inputs.crate_release_version }} triggered by ${{ github.event_name }}" | ||
git commit --allow-empty -m "Update to ${{ github.event.inputs.stable_release_branch }} triggered by ${{ github.event_name }}" | ||
git push | ||
working-directory: "${{ env.template-path }}" |