File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,21 @@ CANDIDATE=$(./gradlew printVersion -Psnapshot=false | grep 'Version:' | cut -f2
127127git add build.gradle.kts
128128git commit -m " [Automated] Bump dev version to ${CANDIDATE} "
129129
130- git push $DRYRUN --atomic --set-upstream origin $BRANCH
130+ if [ -z " $DRYRUN " ]; then
131+ BUMP_BRANCH=" automated/bump-${CANDIDATE// ./ -} "
132+ git checkout -b " $BUMP_BRANCH "
133+ git push --set-upstream origin " $BUMP_BRANCH "
134+ BUMP_PR_URL=$( gh pr create \
135+ --title " [Automated] Bump dev version to ${CANDIDATE} " \
136+ --body " Automated version bump after releasing v${BASE} . Please review and merge." \
137+ --base " $BRANCH " \
138+ --head " $BUMP_BRANCH " )
139+ echo " BUMP_PR_URL=$BUMP_PR_URL " >> " ${GITHUB_OUTPUT:-/ dev/ null} "
140+ echo " ⚠ Version bump PR requires manual approval: $BUMP_PR_URL "
141+ else
142+ git push $DRYRUN --atomic --set-upstream origin $BRANCH
143+ fi
144+
131145git push $DRYRUN --atomic --tags
132146
133147echo " ==================== RELEASE SUMMARY ===================="
Original file line number Diff line number Diff line change 2727permissions :
2828 contents : write
2929 actions : read
30+ pull-requests : write
3031
3132jobs :
3233 validate-inputs :
@@ -193,6 +194,7 @@ jobs:
193194 java-version : ' 21'
194195
195196 - name : Create release
197+ id : create-release
196198 env :
197199 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
198200 run : |
@@ -209,13 +211,21 @@ jobs:
209211
210212 - name : Output Release Summary
211213 if : ${{ inputs.dry_run != true }}
214+ env :
215+ BUMP_PR_URL : ${{ steps.create-release.outputs.BUMP_PR_URL }}
212216 run : |
213217 echo "## ✅ Release Created Successfully" >> $GITHUB_STEP_SUMMARY
214218 echo "" >> $GITHUB_STEP_SUMMARY
215219 echo "### Release Details" >> $GITHUB_STEP_SUMMARY
216220 echo "- **Tag**: v_${{ needs.validate-inputs.outputs.release_version }}" >> $GITHUB_STEP_SUMMARY
217221 echo "- **Branch**: ${{ needs.validate-inputs.outputs.release_branch }}" >> $GITHUB_STEP_SUMMARY
218222 echo "" >> $GITHUB_STEP_SUMMARY
223+ if [ -n "$BUMP_PR_URL" ]; then
224+ echo "### ⚠ Action Required" >> $GITHUB_STEP_SUMMARY
225+ echo "A version bump PR needs review and merge before the next snapshot builds carry the correct version:" >> $GITHUB_STEP_SUMMARY
226+ echo "- $BUMP_PR_URL" >> $GITHUB_STEP_SUMMARY
227+ echo "" >> $GITHUB_STEP_SUMMARY
228+ fi
219229 echo "### Next Steps (Automatic)" >> $GITHUB_STEP_SUMMARY
220230 echo "1. 🔨 GitLab pipeline will build multi-platform artifacts" >> $GITHUB_STEP_SUMMARY
221231 echo "2. 📦 GitLab will publish to Maven Central" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments