1616 description : ' Next development version override (optional, must end with -SNAPSHOT)'
1717 required : false
1818 type : string
19+ changelogEntry :
20+ description : ' Changelog entry (Markdown bullets, e.g. "- Fix X"). Prepended to the module RELEASE.CHANGELOG.md in the version-bump PR and used as the GitHub Release notes. Required.'
21+ required : true
22+ type : string
1923 skip_publish :
2024 description : ' Skip publish (dry-run validation)'
2125 required : false
3842 MODULE : aws-lambda-java-runtime-interface-client
3943 RELEASE_VERSION_INPUT : ${{ github.event.inputs.releaseVersion }}
4044 DEVELOPMENT_VERSION_INPUT : ${{ github.event.inputs.developmentVersion }}
45+ CHANGELOG_ENTRY_INPUT : ${{ github.event.inputs.changelogEntry }}
4146 MAVEN_ARGS : " -B --no-transfer-progress"
4247 AWS_REGION : ${{ vars.AWS_REGION_MAVEN_RELEASE }}
4348 OIDC_ROLE_ARN : ${{ secrets.AWS_ROLE_MAVEN_RELEASE }}
7580
7681 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
7782
78- # Use the CodeBuild image's preinstalled Corretto 8. The image ships it at
79- # $JAVA_8_HOME but defaults JAVA_HOME to Java 25, so point JAVA_HOME/PATH at
80- # 8. Avoids actions/setup-java, which fetches from corretto.github.io +
81- # corretto.aws, both blocked by the runner egress lock. $JAVA_8_HOME
82- # resolves per-arch (x86_64/aarch64).
8383 - name : Use the runner image's preinstalled Corretto 8
84- run : |
85- echo "JAVA_HOME=$JAVA_8_HOME" >> "$GITHUB_ENV"
86- echo "$JAVA_8_HOME/bin" >> "$GITHUB_PATH"
87- "$JAVA_8_HOME/bin/java" -version
88- mkdir -p "$HOME/.m2"
89- cat > "$HOME/.m2/toolchains.xml" <<EOF
90- <?xml version="1.0" encoding="UTF-8"?>
91- <toolchains>
92- <toolchain>
93- <type>jdk</type>
94- <provides><version>8</version></provides>
95- <configuration><jdkHome>$JAVA_8_HOME</jdkHome></configuration>
96- </toolchain>
97- </toolchains>
98- EOF
84+ uses : ./.github/actions/setup-corretto8
9985
10086 # Route all mvn resolution through the CodeArtifact mirror. Must precede
10187 # resolve-release-version, which invokes `mvn help:evaluate`. Ambient
@@ -164,27 +150,8 @@ jobs:
164150 with :
165151 fetch-depth : 0 # full history for tagging/pushing
166152
167- # Use the CodeBuild image's preinstalled Corretto 8. The image ships it at
168- # $JAVA_8_HOME but defaults JAVA_HOME to Java 25, so point JAVA_HOME/PATH at
169- # 8. Avoids actions/setup-java, which fetches from corretto.github.io +
170- # corretto.aws, both blocked by the runner egress lock. $JAVA_8_HOME
171- # resolves per-arch (x86_64/aarch64).
172153 - name : Use the runner image's preinstalled Corretto 8
173- run : |
174- echo "JAVA_HOME=$JAVA_8_HOME" >> "$GITHUB_ENV"
175- echo "$JAVA_8_HOME/bin" >> "$GITHUB_PATH"
176- "$JAVA_8_HOME/bin/java" -version
177- mkdir -p "$HOME/.m2"
178- cat > "$HOME/.m2/toolchains.xml" <<EOF
179- <?xml version="1.0" encoding="UTF-8"?>
180- <toolchains>
181- <toolchain>
182- <type>jdk</type>
183- <provides><version>8</version></provides>
184- <configuration><jdkHome>$JAVA_8_HOME</jdkHome></configuration>
185- </toolchain>
186- </toolchains>
187- EOF
154+ uses : ./.github/actions/setup-corretto8
188155
189156 # Route all mvn resolution through the CodeArtifact mirror. Must precede
190157 # resolve-release-version (which invokes `mvn help:evaluate`) and the OIDC
@@ -304,6 +271,10 @@ jobs:
304271 gpgconf --kill gpg-agent || true
305272 gpg --batch --import <<< "$GPG_PRIVATE_KEY"
306273 GPG_KEYNAME=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/ {print $5; exit}')
274+ # Publish the primary key fingerprint (NOT secret) for the GitHub
275+ # Release verification instructions. Only the public fingerprint
276+ # crosses $GITHUB_ENV here; the passphrase and token never do.
277+ echo "GPG_FINGERPRINT=$(gpg --list-secret-keys --with-colons | awk -F: '/^fpr:/ {print $10; exit}')" >> "$GITHUB_ENV"
307278
308279 # Global settings holding only the Sonatype "central" server for upload.
309280 # Passed to Maven as -gs (global) so it MERGES with the CodeArtifact
@@ -339,10 +310,31 @@ jobs:
339310 git commit -am "chore(ric): release ${EFFECTIVE_RELEASE_VERSION}"
340311 git tag "$TAG_NAME"
341312
342- # Next development version commit.
313+ # Next development version commit. Also refresh the informational
314+ # lastPublished marker to the version just published (rides in the
315+ # post-release commit, so the tagged release commit is untouched).
343316 mvn versions:set -DnewVersion="$NEXT_DEV_VERSION" -DgenerateBackupPoms=false --file "$MODULE/pom.xml"
317+ if grep -q "<!-- lastPublished:" "$MODULE/pom.xml"; then
318+ sed -i "s|<!-- lastPublished:.*-->|<!-- lastPublished: ${EFFECTIVE_RELEASE_VERSION} (auto-updated by release-runtime-interface-client.yml) -->|" "$MODULE/pom.xml"
319+ fi
344320 git commit -am "chore(ric): prepare next development ${NEXT_DEV_VERSION}"
345321
322+ # Prepend the changelog entry so it ships in the version-bump PR (on
323+ # top of the dev-version commit, after the tag, so the tag itself is
324+ # unchanged). Passed via env, never interpolated into the script, so
325+ # it can't inject shell.
326+ CHANGELOG="$MODULE/RELEASE.CHANGELOG.md"
327+ TMP="$(mktemp)"
328+ {
329+ echo "### $(date +'%B %d, %Y')"
330+ echo "\`${EFFECTIVE_RELEASE_VERSION}\`:"
331+ printf '%s\n\n' "$CHANGELOG_ENTRY_INPUT"
332+ [ -f "$CHANGELOG" ] && cat "$CHANGELOG"
333+ } > "$TMP"
334+ mv "$TMP" "$CHANGELOG"
335+ git add "$CHANGELOG"
336+ git commit -m "docs(release): add ${MODULE} ${EFFECTIVE_RELEASE_VERSION} changelog entry"
337+
346338 # Tag push isn't gated by branch protection; the version-bump commits
347339 # go to a release branch and land on main via PR.
348340 git push origin "refs/tags/${TAG_NAME}"
@@ -354,6 +346,24 @@ jobs:
354346 --title "chore(release): ${MODULE} ${EFFECTIVE_RELEASE_VERSION}" \
355347 --body "Post-release version bump for ${MODULE} ${EFFECTIVE_RELEASE_VERSION} (already on Maven Central, tag ${TAG_NAME} pushed)."
356348
349+ # GitHub Release on the pushed tag: the signed artifacts (byte-for-byte the
350+ # same detached GPG signatures uploaded to Maven Central) + verification
351+ # instructions. `mvn deploy` signed in place, so the jars and their .asc
352+ # siblings are in the module target dir and need no re-signing.
353+ - name : Create GitHub Release
354+ if : ${{ github.event.inputs.skip_publish != 'true' }}
355+ uses : ./.github/actions/create-github-release
356+ with :
357+ tag : ${{ env.TAG_NAME }}
358+ title : ${{ env.MODULE }} ${{ env.EFFECTIVE_RELEASE_VERSION }}
359+ module : ${{ env.MODULE }}
360+ version : ${{ env.EFFECTIVE_RELEASE_VERSION }}
361+ changelog-entry : ${{ env.CHANGELOG_ENTRY_INPUT }}
362+ fingerprint : ${{ env.GPG_FINGERPRINT }}
363+ artifact-dir : ${{ env.MODULE }}/target
364+ extra-notes : " Artifacts: main JAR + linux/linux_musl x x86_64/aarch_64 native classifier JARs."
365+ github-token : ${{ github.token }}
366+
357367 # Dry-run: validate assembly, no publish/push.
358368 - name : Dry-run assemble (no publish)
359369 if : ${{ github.event.inputs.skip_publish == 'true' }}
0 commit comments