Skip to content

fix(release): atomic bundle upload to Maven Central (fixes incomplete beta18) - #57

Merged
aldefy merged 2 commits into
mainfrom
chore/vanniktech-publish
Aug 20, 2026
Merged

aldefy merged 2 commits into
mainfrom
chore/vanniktech-publish

Conversation

@aldefy

@aldefy aldefy commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

1.0.0-beta18 published to Maven Central incomplete — only lumen-iosx64 and lumen-iossimulatorarm64 made it; lumen-android, lumen-jvm, lumen-wasm-js, lumen-iosarm64, and the root lumen (KMP metadata) publication never did. Confirmed on the Central Portal UI (Component Coordinates showed exactly 2 artifacts) and on central.sonatype.com/artifact/io.github.aldefy/lumen/versions (beta18 never appeared).

Root cause: the OSSRH-compatibility manual/upload endpoint (what #55/#56 used) stages each Gradle publish*ToSonatypeRepository task as its own implicit deployment. A 7-publication KMP build uploads them 15–25s apart over ~2 minutes; the one manual-transfer call afterward only grabs whatever's most recent. Verified this is the actual mechanism by checking aldefy/composeproof's release.yml, which already publishes successfully in production — it doesn't use this endpoint at all.

Fix

Matches composeproof's proven pattern:

  • lumen/build.gradle.kts: removed the sonatype remote Maven repository entirely. Only localStaging remains — maven-publish/signing config is otherwise unchanged.
  • release.yml: replaced the two Sonatype-specific steps with one curl --form bundle=@lumen-<tag>-bundle.zip upload to Central's official Publisher API (central.sonatype.com/api/v1/publisher/upload), atomic by construction — no per-publication staging. publishingType=AUTOMATIC releases immediately on validation, confirmed against composeproof's real release history (not guessed).
  • No new secret needed — Central's Bearer token is the identical base64(username:password) already computed from OSSRH_USERNAME/OSSRH_PASSWORD.

Bumps to 1.0.0-beta19 to verify end-to-end on a real tag.

1.0.0-beta18 is permanently broken

Central doesn't allow re-publishing a version. io.github.aldefy:lumen:1.0.0-beta18 will exist forever with only the two iOS artifacts. Documented in the CHANGELOG as a known issue — don't depend on it.

Test plan

aldefy added 2 commits August 20, 2026 12:02
…atype push

1.0.0-beta18 confirmed the actual failure mode: the OSSRH-compat
"manual/upload" endpoint stages each Gradle publish task as its own
implicit deployment. A 7-publication KMP build uploads those 15-25s
apart over ~2 minutes, and the single transfer/publish call afterward
only picks up whatever's most recent - in beta18's case, just the 2
last-published iOS artifacts (lumen-iosx64, lumen-iossimulatorarm64).
Android, JVM, wasmJs, and the KMP metadata module never made it, and
can't be added now - Central doesn't allow republishing a version, so
io.github.aldefy:lumen:1.0.0-beta18 is permanently incomplete on Maven
Central. Do not depend on that version; use 1.0.0-beta19+ once verified.

Root cause found by checking aldefy/composeproof's release.yml, which
already publishes successfully in production: it never hits the OSSRH-
compat endpoint at all. It zips the whole local-staging output into one
bundle and POSTs it in a single multipart upload to Central's official
Publisher API (central.sonatype.com/api/v1/publisher/upload), which is
atomic - no per-publication staging, no timing window to lose artifacts
in. This PR switches Lumen to the same pattern:

- lumen/build.gradle.kts: removed the "sonatype" remote Maven repository
  entirely (both maven-publish and signing plugins/config are otherwise
  unchanged - this was never a plugin problem). Only localStaging remains.
- release.yml: replaced the two Sonatype-specific steps (publish-to-
  Sonatype-repository, then a separate manual-transfer call) with one
  curl --form bundle upload of the zip that's already being created for
  the GitHub release asset. publishingType=AUTOMATIC releases immediately
  on successful validation - same parameter name/value confirmed working
  against composeproof's real release history, not guessed.

SONATYPE_TOKEN doesn't need to be a new secret: Central's official API
uses the identical base64(username:password) Bearer token as the OSSRH-
compat one, so this reuses the existing OSSRH_USERNAME/OSSRH_PASSWORD
secrets already set on this repo.

Verified locally: publishAllPublicationsToLocalStagingRepository still
produces all 7 expected publications (lumen, lumen-android, lumen-jvm,
lumen-wasm-js, lumen-iosarm64, lumen-iossimulatorarm64, lumen-iosx64).
actionlint clean, apiCheck passes.
Exists to verify the bundle-upload publish fix end to end on a real
tag. No library code changes.
@aldefy
aldefy merged commit b0affb6 into main Aug 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant