Skip to content

Commit ea5cbbc

Browse files
authored
feat(ci): Add workflow to automate release branch creation (#1090)
- Use App token for pushing the release branch (fixes permission error) - Add next steps checklist with PR link in workflow summary
1 parent f21fe91 commit ea5cbbc

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/create-release-branch.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,19 @@ jobs:
4949
current_minor: ${{ steps.detect-version.outputs.current_minor }}
5050
branch_created: ${{ steps.check-branch.outputs.branch_created }}
5151
steps:
52+
- name: Get GitHub App token
53+
id: app-token
54+
uses: actions/create-github-app-token@v2
55+
with:
56+
app-id: ${{ vars.APP_REPO_WRITER_ID }}
57+
private-key: ${{ secrets.APP_REPO_WRITER_PRIVATE_KEY }}
58+
5259
- name: Checkout master
5360
uses: actions/checkout@v6
5461
with:
5562
ref: master
5663
fetch-depth: 0
64+
token: ${{ steps.app-token.outputs.token }}
5765

5866
- name: Detect current version
5967
id: detect-version
@@ -185,5 +193,10 @@ jobs:
185193
echo "- Would create branch: \`${RELEASE_BRANCH}\`" >> "$GITHUB_STEP_SUMMARY"
186194
else
187195
echo "- Release branch: \`${RELEASE_BRANCH}\`" >> "$GITHUB_STEP_SUMMARY"
188-
[ -n "$PR_URL" ] && echo "- Version bump PR: $PR_URL" >> "$GITHUB_STEP_SUMMARY"
196+
if [ -n "$PR_URL" ]; then
197+
echo "" >> "$GITHUB_STEP_SUMMARY"
198+
echo "### Next steps" >> "$GITHUB_STEP_SUMMARY"
199+
echo "" >> "$GITHUB_STEP_SUMMARY"
200+
echo "- [ ] Review and approve version bump PR: $PR_URL" >> "$GITHUB_STEP_SUMMARY"
201+
fi
189202
fi

0 commit comments

Comments
 (0)