@@ -250,6 +250,21 @@ jobs:
250250 -Darguments="-gs $MAVEN_SETTINGS -Prelease -Dgpg.keyname=$GPG_KEYNAME" \
251251 --file "$MODULE/pom.xml"
252252
253+ # release:perform builds in a fresh SCM checkout under
254+ # <module>/target/checkout. Because the whole repo is one git repo, the
255+ # checkout re-nests the module, so the signed jars land under
256+ # <module>/target/checkout/<module>/target, not .../checkout/target.
257+ # Locate them by their detached signatures right after the build, pin
258+ # the directory into the env for the GitHub Release step, and fail loudly
259+ # if the publish produced no signed artifact.
260+ SIGNED_JAR=$(find "$MODULE/target/checkout" -type f -name '*.jar.asc' -print -quit)
261+ if [[ -z "$SIGNED_JAR" ]]; then
262+ echo "::error::No signed artifacts (*.jar.asc) found under $MODULE/target/checkout after release:perform"
263+ exit 1
264+ fi
265+ echo "ARTIFACT_DIR=$(dirname "$SIGNED_JAR")" >> "$GITHUB_ENV"
266+ echo "::notice::Signed release artifacts at $(dirname "$SIGNED_JAR")"
267+
253268 # Fold the lastPublished marker and changelog entry into the single
254269 # next-development commit that release:prepare created (local, unpushed),
255270 # so the whole post-release bump is ONE commit in the version-bump PR
@@ -287,25 +302,17 @@ jobs:
287302 # the just-released -SNAPSHOT.
288303 - name : Push release tag and open version-bump PR
289304 if : ${{ github.event.inputs.skip_publish != 'true' }}
290- env :
291- GH_TOKEN : ${{ github.token }}
292- run : |
293- RELEASE_BRANCH="release/${TAG_NAME}"
294-
295- # Tag push isn't gated by branch protection; commits go via a PR.
296- git push origin "refs/tags/${TAG_NAME}"
297- git push origin "HEAD:refs/heads/${RELEASE_BRANCH}"
298-
299- gh pr create \
300- --base "${GITHUB_REF_NAME}" \
301- --head "${RELEASE_BRANCH}" \
302- --title "chore(release): ${MODULE} ${EFFECTIVE_RELEASE_VERSION}" \
303- --body "Post-release version bump for ${MODULE} ${EFFECTIVE_RELEASE_VERSION} (already on Maven Central, tag ${TAG_NAME} pushed)."
305+ uses : ./.github/actions/push-tag-and-open-pr
306+ with :
307+ tag : ${{ env.TAG_NAME }}
308+ module : ${{ env.MODULE }}
309+ version : ${{ env.EFFECTIVE_RELEASE_VERSION }}
310+ base-branch : ${{ github.ref_name }}
311+ github-token : ${{ github.token }}
304312
305313 # GitHub Release on the pushed tag: changelog + Central link + GPG verify
306314 # instructions, with the signed jars and their .asc signatures attached.
307- # release:perform builds in a fresh checkout, so the signed artifacts live
308- # under <module>/target/checkout/target.
315+ # ARTIFACT_DIR was pinned to the checkout's build output by the publish step.
309316 - name : Create GitHub Release
310317 if : ${{ github.event.inputs.skip_publish != 'true' }}
311318 uses : ./.github/actions/create-github-release
@@ -316,7 +323,7 @@ jobs:
316323 version : ${{ env.EFFECTIVE_RELEASE_VERSION }}
317324 changelog-entry : ${{ env.CHANGELOG_ENTRY_INPUT }}
318325 fingerprint : ${{ env.GPG_FINGERPRINT }}
319- artifact-dir : ${{ env.MODULE }}/target/checkout/target
326+ artifact-dir : ${{ env.ARTIFACT_DIR }}
320327 github-token : ${{ github.token }}
321328
322329 - name : Dry-run release (prepare only, no publish)
0 commit comments