Skip to content

Commit a295efa

Browse files
committed
ci(java): consolidate release artifact summary
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e2a48f51-02fe-445b-a253-40776b09a44f
1 parent da602ba commit a295efa

1 file changed

Lines changed: 22 additions & 23 deletions

File tree

‎.github/workflows/java-publish-maven.yml‎

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ jobs:
144144
145145
echo "release_version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"
146146
echo "development_version=$DEV_VERSION" >> "$GITHUB_OUTPUT"
147-
{
148-
echo "### Version Summary"
149-
echo "- **Release version:** $RELEASE_VERSION"
150-
echo "- **Next development version:** $DEV_VERSION"
151-
} >> "$GITHUB_STEP_SUMMARY"
152147
153148
- name: Update documentation with release version
154149
id: update-docs
@@ -188,12 +183,6 @@ jobs:
188183
echo "release_tag=$TAG" >> "$GITHUB_OUTPUT"
189184
echo "tag_commit=$TAG_COMMIT" >> "$GITHUB_OUTPUT"
190185
echo "post_prepare_commit=$POST_PREPARE_COMMIT" >> "$GITHUB_OUTPUT"
191-
{
192-
echo "### Release Source Identity"
193-
echo "- **Tag:** \`$TAG\`"
194-
echo "- **Tag commit:** \`$TAG_COMMIT\`"
195-
echo "- **Post-prepare main commit:** \`$POST_PREPARE_COMMIT\`"
196-
} >> "$GITHUB_STEP_SUMMARY"
197186
198187
build-windows-classifier:
199188
name: Build Windows native classifier
@@ -242,13 +231,6 @@ jobs:
242231
$hash = (Get-FileHash -Algorithm SHA256 -LiteralPath $jar).Hash.ToLowerInvariant()
243232
"$hash $([IO.Path]::GetFileName($jar))" | Set-Content -NoNewline -Encoding ascii $manifest
244233
node copilot-native/scripts/validate-native-artifact.mjs checksum $jar $manifest ([IO.Path]::GetFileName($jar))
245-
@"
246-
### Windows Classifier
247-
- **Source commit:** ``$sourceCommit``
248-
- **Artifact:** ``$([IO.Path]::GetFileName($jar))``
249-
- **SHA-256:** ``$hash``
250-
- **Publication:** none (build-only job)
251-
"@ | Add-Content $env:GITHUB_STEP_SUMMARY
252234
253235
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
254236
with:
@@ -320,17 +302,34 @@ jobs:
320302
node "$GITHUB_WORKSPACE/java/copilot-native/scripts/validate-native-artifact.mjs" \
321303
classifier win32-x64 "$JAR" "$(basename "$JAR")" "$GITHUB_WORKSPACE"
322304
echo "windows_jar=$JAR" >> "$GITHUB_OUTPUT"
323-
{
324-
echo "### Release Input Verification"
325-
echo "- **Source commit:** \`$SOURCE_COMMIT\`"
326-
echo "- **Windows classifier SHA-256:** \`$(cut -d ' ' -f 1 "$MANIFEST")\`"
327-
} >> "$GITHUB_STEP_SUMMARY"
305+
echo "windows_sha=$(cut -d ' ' -f 1 "$MANIFEST")" >> "$GITHUB_OUTPUT"
328306
329307
- name: Build Linux classifier and deploy complete release
330308
id: publish-maven
331309
run: |
310+
VERSION="${{ needs.prepare-release.outputs.release_version }}"
332311
mvn -B deploy -DskipTests -Prelease -Dcopilot.native.libc=glibc \
333312
"-Dcopilot.native.external.win32.classifier.path=${{ steps.windows-artifact.outputs.windows_jar }}"
313+
LINUX_JAR="copilot-native/target/copilot-sdk-java-runtime-$VERSION-linux-x64.jar"
314+
test -f "$LINUX_JAR"
315+
node copilot-native/scripts/validate-native-artifact.mjs \
316+
classifier linux-x64 "$LINUX_JAR" "$(basename "$LINUX_JAR")" ..
317+
LINUX_SHA=$(sha256sum "$LINUX_JAR" | cut -d ' ' -f 1)
318+
{
319+
echo "### Maven Central Release"
320+
echo "- **Version:** $VERSION"
321+
echo "- **Source tag:** \`${{ needs.prepare-release.outputs.release_tag }}\`"
322+
echo "- **Source commit:** \`${{ needs.prepare-release.outputs.tag_commit }}\`"
323+
echo "- **Next development version:** ${{ needs.prepare-release.outputs.development_version }}"
324+
echo "- **Repository:** Maven Central"
325+
echo ""
326+
echo "#### Published Native Classifiers"
327+
echo ""
328+
echo "| Classifier | Build runner | Artifact | SHA-256 | Status |"
329+
echo "| --- | --- | --- | --- | --- |"
330+
echo "| \`linux-x64\` | \`ubuntu-latest\` | \`$(basename "$LINUX_JAR")\` | \`$LINUX_SHA\` | Published |"
331+
echo "| \`win32-x64\` | \`windows-latest\` | \`$(basename "${{ steps.windows-artifact.outputs.windows_jar }}")\` | \`${{ steps.windows-artifact.outputs.windows_sha }}\` | Published |"
332+
} >> "$GITHUB_STEP_SUMMARY"
334333
env:
335334
MAVEN_USERNAME: ${{ secrets.JAVA_MAVEN_CENTRAL_USERNAME }}
336335
MAVEN_PASSWORD: ${{ secrets.JAVA_MAVEN_CENTRAL_PASSWORD }}

0 commit comments

Comments
 (0)