|
18 | 18 | # A manual dispatch for now - automatic on releases later.
|
19 | 19 | workflow_dispatch:
|
20 | 20 | inputs:
|
21 |
| - crate_release_version: |
22 |
| - description: 'A release version to use, e.g. 1.9.0' |
| 21 | + stable_release_branch: |
| 22 | + description: 'Stable release branch, e.g. stable2407' |
23 | 23 | required: true
|
24 | 24 |
|
25 |
| - |
26 | 25 | jobs:
|
27 | 26 | sync-templates:
|
28 | 27 | runs-on: ubuntu-latest
|
|
44 | 43 | - uses: actions/checkout@v4
|
45 | 44 | with:
|
46 | 45 | path: polkadot-sdk
|
47 |
| - ref: "release-crates-io-v${{ github.event.inputs.crate_release_version }}" |
| 46 | + ref: "${{ github.event.inputs.stable_release_branch }}" |
48 | 47 | - name: Generate a token for the template repository
|
49 | 48 | id: app_token
|
50 | 49 |
|
|
72 | 71 |
|
73 | 72 | # 2. Yanking the template out of the monorepo workspace.
|
74 | 73 |
|
75 |
| - - name: Use psvm to replace git references with released creates. |
76 |
| - run: find . -type f -name 'Cargo.toml' -exec psvm -o -v ${{ github.event.inputs.crate_release_version }} -p {} \; |
| 74 | + - name: Replace dev-dependencies path references with workspace references |
| 75 | + run: find . -type f -name 'Cargo.toml' -exec sed -i'' -E "s/path = \"\.\.\/.*\"/workspace = true/g" {} \; |
77 | 76 | working-directory: polkadot-sdk/templates/${{ matrix.template }}/
|
78 | 77 | - name: Create a new workspace Cargo.toml
|
79 | 78 | run: |
|
@@ -123,7 +122,7 @@ jobs:
|
123 | 122 | cp -r polkadot-sdk/templates/${{ matrix.template }}/* "${{ env.template-path }}/"
|
124 | 123 |
|
125 | 124 | - name: Run psvm on monorepo workspace dependencies
|
126 |
| - run: psvm -o -v ${{ github.event.inputs.crate_release_version }} -p ./Cargo.toml |
| 125 | + run: psvm -o -v ${{ github.event.inputs.stable_release_branch }} -p ./Cargo.toml |
127 | 126 | working-directory: polkadot-sdk/
|
128 | 127 | - name: Copy over required workspace dependencies
|
129 | 128 | run: |
|
@@ -164,12 +163,12 @@ jobs:
|
164 | 163 | token: ${{ steps.app_token.outputs.token }}
|
165 | 164 | add-paths: |
|
166 | 165 | ./*
|
167 |
| - title: "[Don't merge] Update the ${{ matrix.template }} template to ${{ github.event.inputs.crate_release_version }}" |
| 166 | + title: "[Don't merge] Update the ${{ matrix.template }} template to ${{ github.event.inputs.stable_release_branch }}" |
168 | 167 | body: "The template has NOT been successfully built and needs to be inspected."
|
169 |
| - branch: "update-template/${{ github.event.inputs.crate_release_version }}" |
| 168 | + branch: "update-template/${{ github.event.inputs.stable_release_branch }}" |
170 | 169 | - name: Push changes
|
171 | 170 | run: |
|
172 | 171 | git add -A .
|
173 |
| - git commit --allow-empty -m "Update to ${{ github.event.inputs.crate_release_version }} triggered by ${{ github.event_name }}" |
| 172 | + git commit --allow-empty -m "Update to ${{ github.event.inputs.stable_release_branch }} triggered by ${{ github.event_name }}" |
174 | 173 | git push
|
175 | 174 | working-directory: "${{ env.template-path }}"
|
0 commit comments