Skip to content

attempting to publish to maven central using nmcp#818

Merged
lemire merged 5 commits intomasterfrom
yet_another_release_system_attempt
Feb 19, 2026
Merged

attempting to publish to maven central using nmcp#818
lemire merged 5 commits intomasterfrom
yet_another_release_system_attempt

Conversation

@lemire
Copy link
Member

@lemire lemire commented Jan 22, 2026

This is an attempt (maybe the 10th attempt) at allowing maven central releases based on a proposal by @snazi

We currently have the following secrets:

  • GPG_KEY_NAME
  • GPG_PASSPHRASE
  • GPG_PRIVATE_KEY
  • MAVEN_PASSWORD
  • MAVEN_USER

We have an existing CI action that publishes to github actions when a release is created: https://github.com/RoaringBitmap/RoaringBitmap/blob/master/.github/workflows/releases.yml
I am not touching it (much).

Instead we add a Create Release action which would be manually triggered. It would then (eventually) trigger our existing release CI, and also a new one that would (hopefully) publish to maven central.

For good measure, we also add a snapshot CI action.

Whether this is right, I do not know.

Fixes #749

lemire and others added 2 commits January 23, 2026 09:29
Co-authored-by: Lari Hotari <[email protected]>
Co-authored-by: Lari Hotari <[email protected]>
@lemire
Copy link
Member Author

lemire commented Jan 23, 2026

@lhotari Much appreciated.

@lhotari
Copy link
Contributor

lhotari commented Jan 23, 2026

I tested locally building the Central Portal Publish API zip file with the nmcpZipAggregation task for debugging the nmcp plugin.

# create a zip file for NMCP aggregation with signing
ORG_GRADLE_PROJECT_signingKey=$(gpg --armor --export-secret-keys 1234578) \
ORG_GRADLE_PROJECT_signingPassword=my_key_password \
ORG_GRADLE_PROJECT_sonatypeUsername=example_username \
ORG_GRADLE_PROJECT_sonatypePassword=example_password \
CI=1 \
./gradlew -Pversion=1.6.1 nmcpZipAggregation

# and then checked the build/nmcp/zip/aggregation.zip file
unzip -v build/nmcp/zip/aggregation.zip |less

The result looks fine.

One detail which might have to be revisited since the last time Maven Central publishing was used is creating a token for the Portal Publish API. This is mentioned in the documentation.

To generate a user token, visit the Account page and click the "Generate User Token" button.

@lemire
Copy link
Member Author

lemire commented Jan 23, 2026

@lhotari

One detail which might have to be revisited since the last time Maven Central publishing was used is creating a token for the Portal Publish API. This is mentioned in the documentation.

It should be already setup with secrets:

MAVEN_PASSWORD, MAVEN_USER

E.g., the JavaFastPFor project, uses these same tokens, so they work.

@lemire lemire merged commit b38e0af into master Feb 19, 2026
11 checks passed
@lemire
Copy link
Member Author

lemire commented Feb 19, 2026

I try merging this PR and testing it out and it failed even after I tried many things.

So I am declaring it a dead-end.

@lhotari
Copy link
Contributor

lhotari commented Feb 19, 2026

I try merging this PR and testing it out and it failed even after I tried many things.

So I am declaring it a dead-end.

I added a comment about what went wrong in one of the last attempts: 96d851c#r177629944 .
It's pretty painful to get things right. I'll try to find time for a follow up so that we could be successful next time.

@kevinjqliu
Copy link

hey @lemire @lhotari i see this PR was merged to master but i dont see it in the commits, https://github.com/RoaringBitmap/RoaringBitmap/commits/master/
was it reverted?

I'm happy to help with getting this working

@lemire
Copy link
Member Author

lemire commented Feb 19, 2026

@lhotari @kevinjqliu It cannot work because one workflow using GITHUB_TOKEN cannot trigger the other workflows. So it was dead on arrival.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publishing to Maven Central

4 participants