Skip to content

Commit 1c855bd

Browse files
fix(ci): use JEngine Release Bot for plugin releases (#599)
Use GitHub App token (same as release.yml) instead of GITHUB_TOKEN to ensure commits are made by JEngine Release Bot. Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ae29a2f commit 1c855bd

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

.github/workflows/release-plugin.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,19 @@ jobs:
2626
(github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch') &&
2727
(github.event_name == 'workflow_dispatch' || !contains(github.event.head_commit.message || '', 'chore(plugin): bump version'))
2828
steps:
29-
- uses: actions/checkout@v4
29+
# Generate GitHub App token for authenticated commits (same as release.yml)
30+
- name: Generate GitHub App Token
31+
id: generate-token
32+
uses: actions/create-github-app-token@v1
33+
with:
34+
app-id: ${{ secrets.RELEASE_APP_ID }}
35+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
36+
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
3039
with:
3140
fetch-depth: 0
32-
token: ${{ secrets.GITHUB_TOKEN }}
41+
token: ${{ steps.generate-token.outputs.token }}
3342

3443
- name: Bump plugin version
3544
id: bump
@@ -50,11 +59,26 @@ jobs:
5059
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
5160
echo "Bumped plugin version from $CURRENT to $NEW_VERSION"
5261
53-
- name: Commit and tag
62+
# Commit and push changes (identical pattern to release.yml)
63+
- name: Commit and push changes
5464
run: |
55-
git config user.name "github-actions[bot]"
56-
git config user.email "github-actions[bot]@users.noreply.github.com"
65+
# Use GitHub's bot email format so the app avatar shows on commits
66+
# The user ID (257041894) is from: gh api '/users/jengine-release-bot[bot]' --jq '.id'
67+
# This is different from the App ID - it's the bot account's user ID
68+
git config user.name "jengine-release-bot[bot]"
69+
git config user.email "257041894+jengine-release-bot[bot]@users.noreply.github.com"
70+
5771
git add claude-plugin/claude.json
72+
5873
git commit -m "chore(plugin): bump version to ${{ steps.bump.outputs.version }}"
74+
75+
git push origin ${{ github.ref_name }}
76+
77+
echo "✅ Committed and pushed changes"
78+
79+
# Create Git tag
80+
- name: Create Git tag
81+
run: |
5982
git tag "plugin-v${{ steps.bump.outputs.version }}"
60-
git push origin master --tags
83+
git push origin "plugin-v${{ steps.bump.outputs.version }}"
84+
echo "✅ Created and pushed tag plugin-v${{ steps.bump.outputs.version }}"

0 commit comments

Comments
 (0)