Repository navigation
build: attach Maven artifact ZIP bundles to releases - #871
Merged
Merged
Conversation
zhongkechen
marked this pull request as ready for review
November 4, 2026 19:50
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
November 4, 2026 19:50 — with
GitHub Actions
Inactive
…first Address review findings on the release bundles. Bundle contents now match what Sonatype receives. Every file is read from the module's target directory, including the detached GPG signature that the publishing profile writes for the POM and each JAR, so a bundle can be verified against the release signing key rather than only against its own manifest. Reading all eight files from one directory also removes the POM special case: maven-gpg-plugin copies the flattened POM to target as the file it signs, and that copy is byte-identical to .flattened-pom.xml. Release safety. The JAR upload runs before packaging, so a bundling failure can no longer withhold the standalone JARs that the release already published. Bundles upload in a step of their own. Other fixes. The repository root comes from __file__ instead of the working directory, matching test_release_timestamp.py. The version guard now rejects -SNAPSHOT, which its own error message already promised. Stale bundles are cleared before packaging so the upload glob cannot pick up another version. ZIP entries pin create_system so bundles are reproducible across platforms, and the dead ZipFile compression argument is gone. Tests. Every line of the packaging logic now has a test that fails without it: entry metadata, entry order, signature inclusion, the manifest checksum set, stale-output clearing, and snapshot rejection. The coordinate and missing-file cases restore their fixtures in finally blocks and cover all eight published files. A new test cross-checks MODULES against the modules maven_publish.sh deploys and against each module POM, so the list cannot drift silently. The bundle tests moved to their own job, which needs no JDK and no longer waits on the Javadoc reproducibility test. RELEASE.md documents the new assets and how to verify one.
hln33
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add one ZIP bundle per Maven artifact to GitHub releases. Each bundle contains every file that module publishes to Sonatype — the POM, the runtime JAR, the source JAR, the Javadoc JAR, and the detached GPG signature for each of them — plus a SHA-256 manifest. The existing standalone JAR assets remain available.
The release job packages the exact files submitted to Sonatype, so archive consumers use the same artifacts as Maven consumers, and can verify them against the release signing key.
Design
Release consumers that require an archive currently have to assemble separate Maven files themselves. Reusing the existing publication outputs is simpler than polling Maven Central after its separate manual publication step, and preserves the published binaries better than rebuilding source downstream. No existing release output or SDK API is removed.
Every file is read from the module's
targetdirectory.maven-gpg-plugincopies the flattened POM there as the file it signs, so one uniform naming scheme covers all eight files and the bundled POM is the byte-identical copy the signature belongs to.The standalone JARs upload before packaging. A bundling failure then cannot withhold release assets that already uploaded successfully; bundles go up in a step of their own.
Decisions this task did not cover:
create_system, so repeated packaging is byte-reproducible on any platform.3.0.1-rc1are accepted, because RELEASE.md documents prerelease releases;-SNAPSHOTis rejected.*-bundle.zipfiles are cleared before packaging, so the upload glob cannot attach another version's bundles.Validation
MODULESagainst the modulesmaven_publish.shdeploys and against each module POM, so the hardcoded list cannot drift.publishingprofile thatmaven-gpg-plugin3.2.8 createstarget/<artifact>-<version>.pomand that it is byte-identical to.flattened-pom.xml.Unverified assumption: that signing writes
<file>.ascbeside each published file intarget. This is read frommaven-gpg-plugin3.2.8's source (AbstractGpgSigner.SIGNATURE_EXTENSION,new File(file + SIGNATURE_EXTENSION)), not from a signed run, because signing needs the release key. The step fails closed if a signature is absent, and it now runs after the JAR upload, so a wrong assumption costs the bundles and not the release.