Skip to content

fix(release): publish to Central Portal instead of dead OSSRH endpoint - #55

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

aldefy merged 2 commits into
mainfrom
chore/central-portal-publish

Conversation

@aldefy

@aldefy aldefy commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the actual reason nothing past 1.0.0-beta15 has reached Maven Central: s01.oss.sonatype.org (OSSRH) shut down 2025-06-30, and this repo's publish config still pointed at it. Separately, release.yml never had a step that published there in the first place — it only ever wrote to a local staging directory, zipped for the GitHub release.

  • lumen/build.gradle.kts: repo URL → the Central Portal's OSSRH-compatibility staging API (ossrh-staging-api.central.sonatype.com). Credentials there are a Central Portal user token, not a Sonatype account login.
  • release.yml: adds the missing publishAllPublicationsToSonatypeRepository step, plus the mandatory manual-transfer POST the OSSRH-compat API needs afterward (plain maven-publish only PUTs files with no deployment context, so nothing shows up in the Portal without this call). Both steps are gated on OSSRH_USERNAME/OSSRH_PASSWORD existing, so this is a no-op — doesn't break anything — until the manual step below is done.

Required before this can actually publish (repo-owner only, I can't do this)

  1. Log into https://central.sonatype.com, find the io.github.aldefy namespace, click Migrate Namespace.
  2. Generate a Portal user token (Account → Generate User Token).
  3. Add that token's username/password as this repo's OSSRH_USERNAME/OSSRH_PASSWORD secrets (Settings → Secrets and variables → Actions). These are Lumen-repo-specific secrets — they don't carry over from or to any other repo.

Note

aldefy/compose-rebound has the identical dead-endpoint pattern in gradle/publish-convention.gradle.kts. The namespace migration above is account-level and covers both repos' group IDs (io.github.aldefy / io.github.aldefy.rebound), but the workflow fix and the OSSRH_USERNAME/OSSRH_PASSWORD secrets are per-repo — Rebound needs its own PR and its own copy of those secrets, not included here.

Test plan

  • YAML validated
  • ./gradlew :lumen:compileKotlinMetadata — compiles clean
  • Can't verify the actual publish end-to-end without the namespace migration + secrets above

aldefy added 2 commits August 20, 2026 11:19
s01.oss.sonatype.org (OSSRH) shut down 2025-06-30. This repo's publish
config still targeted it, silently, so publishAllPublicationsToSonatype
Repository (never actually wired into release.yml either) would have
failed even if someone tried it. This is almost certainly why nothing
past 1.0.0-beta15 has reached Maven Central - beta16/beta17 both went
out as signed GitHub release zips only.

- lumen/build.gradle.kts: repo URL -> the Central Portal's OSSRH-
  compatibility staging API (ossrh-staging-api.central.sonatype.com).
  Credentials there are a Central Portal "user token", not a Sonatype
  account login - documented inline. Dropped the dead snapshot URL
  branch; the compat endpoint doesn't support SNAPSHOT publishing.
- release.yml: added the actual publish-to-Sonatype step (previously
  missing entirely - the workflow only ever published to a LOCAL
  staging dir, zipped for the GitHub release), plus the mandatory
  manual-transfer POST maven-publish needs to make the upload visible
  in the Portal (it only PUTs files with no deployment context). Both
  steps are gated on OSSRH_USERNAME/OSSRH_PASSWORD being set, so this
  is a no-op until those secrets exist - doesn't break anything if the
  namespace migration below hasn't happened yet.

Needs a one-time manual step before this can actually publish: the
io.github.aldefy namespace has to be migrated from OSSRH to the Central
Portal (https://central.sonatype.com -> find the namespace -> Migrate
Namespace), then a Portal user token generated and added as the
OSSRH_USERNAME/OSSRH_PASSWORD repo secrets. That's account-owner-only;
nothing in this PR can do it.

Same dead-endpoint pattern found in aldefy/compose-rebound's
gradle/publish-convention.gradle.kts - same fix needed there, not
included in this PR.
actionlint caught it, and the actual failed run confirmed it: GitHub
Actions rejects `secrets.X` inside a step's `if:` expression outright
(workflow-parse-time error, so the job never even starts). Switched to
the documented pattern - reference the step's own `env:` (which does
see secrets) in `if:` instead, since a step's env IS visible to its
own if condition.

This is what actually caused the "Release" run just now to fail with
zero real jobs - not a build/logic error, a workflow schema error that
never let :lumen:build start. Verified with `actionlint` (was clean
before I added the secrets check; now clean again with the env-based
version). Ran `actionlint` on every workflow file in the repo, no
other issues found.
@aldefy
aldefy merged commit 203546d 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