Skip to content

Commit c909beb

Browse files
committed
fix template-files sync for changeset commit message
deploy
1 parent 53a4944 commit c909beb

4 files changed

Lines changed: 12 additions & 67 deletions

File tree

.github/workflows/release.yaml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/sync.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,22 @@ jobs:
4343
run: pnpm i
4444

4545
- name: Create Release Pull Request
46-
id: changesets
4746
uses: changesets/action@v1
47+
id: changesets
4848
with:
49+
version: pnpm run version
4950
commit: "[ci] release"
5051
title: "[ci] release"
5152
env:
52-
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
53+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token}}
54+
55+
- name: Get published version
56+
if: steps.changesets.outputs.hasChangesets == 'true'
57+
run: |
58+
git checkout changeset-release/main
59+
VERSION=$(node -p "require('./package.json').version")
60+
git commit --amend -m "[ci] release ${{ env.IMAGE_NAME }} v$VERSION" --no-edit
61+
git push origin changeset-release/main:changeset-release/main --force
5362
5463
prepare-matrix:
5564
name: Prepare Matrix

repos.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
"path": "template-files/.github/workflows/labeler.yaml",
2626
"targetPath": ".github/workflows/labeler.yaml"
2727
},
28-
{
29-
"path": "template-files/.github/workflows/release.yaml",
30-
"targetPath": ".github/workflows/release.yaml",
31-
"props": {
32-
"branchName": "main",
33-
"projectFolder": ""
34-
}
35-
},
3628
{
3729
"path": "template-files/.github/workflows/welcome-bot.yaml",
3830
"targetPath": ".github/workflows/welcome-bot.yaml",

template-files/.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ jobs:
5252
run: |
5353
git checkout changeset-release/main
5454
VERSION=$(node -p "require('.<%= projectFolder %>/package.json').version")
55-
git commit --amend -m "[ci] release v$VERSION" --no-edit
55+
git commit --amend -m "[ci] release ${{ env.IMAGE_NAME }}<%= packageSuffix %> v$VERSION" --no-edit
5656
git push origin changeset-release/main:changeset-release/main --force

0 commit comments

Comments
 (0)