You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by jd...@apache.org on 2026/10/03 01:19:23 UTC
(grails-core) 01/01: Keep the Close Release job going when post-release fails
This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch ci/post-release-manual-fallback
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit c446533522be82be6d9e53abdd8fe097ce030eb4
Author: James Daugherty <jd...@jdresources.net>
AuthorDate: Fri Oct 2 21:17:28 2026 -0400
Keep the Close Release job going when post-release fails
The 8.0.0-RC2 Close Release job stopped when GitHub refused the workflow
token's push of merge-back-8.0.0-RC2, because it considered the branch to
change .github/workflows/gradle.yml. Every remaining reminder step was then
skipped, and nothing said how to finish the merge-back by hand.
The post-release step now continues on error. A step that runs only when it
failed raises a warning and writes the commands to recreate the merge branch
and pull request to the workflow summary, including that the pull request
must be merged with a merge commit so the tag reaches the branch history.
---
.github/workflows/release.yml | 36 ++++++++++++++++++++++++++++++++++++
RELEASE.md | 4 +++-
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1b5d83985e..c55c1ea82c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -684,10 +684,46 @@ jobs:
ref: ${{ env.TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: "⚙️ Run post-release"
+ id: post_release
+ # The release is already published by now, so a failure here must not skip the
+ # remaining reminders. The next step lists what is left to finish by hand.
+ continue-on-error: true
uses: apache/grails-github-actions/post-release@asf
env:
PR_LABELS: skip-changelog
RELEASE_SCRIPT_PATH: '.github/scripts/setSnapshotGrailsVersion.sh'
+ - name: "🩹 MANUAL - Finish post-release"
+ if: steps.post_release.outcome == 'failure'
+ env:
+ NEXT_VERSION: ${{ steps.post_release.outputs.NEXT_VERSION }}
+ run: |
+ NEXT_VERSION="${NEXT_VERSION:-X.Y.Z}"
+ MERGE_BRANCH="merge-back-${VERSION}"
+ cat >> "$GITHUB_STEP_SUMMARY" <<EOF
+ ## ⚠️ Post-release did not finish
+
+ The \`⚙️ Run post-release\` step failed; its log shows where it stopped. Anything it did only on the runner is gone, so check each item below and finish the ones that are missing.
+
+ 1. The \`${VERSION}\` milestone, if there is one, is closed.
+ 2. Branch \`${MERGE_BRANCH}\` exists. To recreate it, run these from a clone with \`${TAG}\` fetched (they need GNU sed), and push with your own credentials, since GitHub refuses the workflow token when it considers the branch to change a file under \`.github/workflows\`:
+
+ \`\`\`
+ git switch -c ${MERGE_BRANCH} ${TAG}
+ sed -i 's/^projectVersion=.*/projectVersion=${NEXT_VERSION}-SNAPSHOT/' gradle.properties
+ NEXT_VERSION=${NEXT_VERSION} GITHUB_WORKSPACE="\$PWD" .github/scripts/setSnapshotGrailsVersion.sh
+ git commit -am '[skip ci] Bump version to ${NEXT_VERSION}-SNAPSHOT'
+ git push <remote for ${REPO_SLUG}> ${MERGE_BRANCH}
+ \`\`\`
+ 3. A pull request from \`${MERGE_BRANCH}\` into \`${TARGET_BRANCH}\` is open:
+
+ \`\`\`
+ gh pr create --repo ${REPO_SLUG} --base ${TARGET_BRANCH} --head ${MERGE_BRANCH} --label skip-changelog --title 'chore: merge ${VERSION}->${TARGET_BRANCH}; bump to ${NEXT_VERSION}-SNAPSHOT' --body 'Automated snapshot bump after completing release ${VERSION}'
+ \`\`\`
+ 4. It is merged with a merge commit, not a squash or rebase, so \`${TAG}\` becomes part of the \`${TARGET_BRANCH}\` history.
+
+ The automated stages are in https://github.com/apache/grails-github-actions/blob/asf/post-release/entrypoint.sh
+ EOF
+ echo "::warning title=Post-release did not finish::Finish merging ${TAG} back into ${TARGET_BRANCH} by hand; the workflow summary lists what is left."
- name: "🌎 MANUAL - Create Blog Post"
run: |
echo "::group::Blog Post Creation - MANUAL"
diff --git a/RELEASE.md b/RELEASE.md
index abb94be5f6..019c7ca634 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -349,7 +349,9 @@ version from Maven Central.
### Close out the `grails-core` release
-The last step in the `grails-core` release workflow is to run the `Close Release` step. This will create a merge branch for the original tag with version number and then open a PR to merge back into the next branch. You will need to merge this PR into the branch after correcting any merge conflict.
+The last step in the `grails-core` release workflow is to run the `Close Release` step. This will create a merge branch for the original tag with version number and then open a PR to merge back into the next branch. You will need to merge this PR into the branch after correcting any merge conflict. Merge it with a merge commit, not a squash or rebase, so that the release tag becomes part of the branch history.
+
+If the post-release step fails, for example because GitHub refuses to let the workflow token push a merge branch that it considers to change a workflow file, the `Close Release` job still runs its remaining steps. The `🩹 MANUAL - Finish post-release` step then raises a warning, and the workflow summary lists the commands to create the merge branch and PR by hand.
After this PR is merged, deploy the new SNAPSHOT to Forge via https://github.com/apache/grails-core/actions/workflows/forge-deploy-aws.yml (Use workflow from the snapshot branch, slot `snapshot`).