-
-
Notifications
You must be signed in to change notification settings - Fork 429
Automate more of Sonatype setup #6796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
28c1095 to
2902448
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR extends Mill’s Sonatype Central publishing setup by enhancing the interactive initGpgKeys flow and adding cross-shell helpers to preview/apply environment-variable configuration automatically.
Changes:
- Add
ShellConfigurationutilities to detect shell config files, format env-var lines, and upsert them (with optional diff preview). - Enhance
initGpgKeysto pass POM-derived hints (name/email/url), support configurable keyserver URL, and offer guided local shell + GitHub Actions setup. - Add unit/integration tests for shell env-var formatting/upsert behavior and the updated
initGpgKeysflow (with a mock keyserver).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/util/java11/src/mill/util/ShellConfiguration.scala | New shell detection + env-var formatting/matching + upsert/preview helpers |
| libs/util/test/src/mill/util/ShellConfigurationTests.scala | Unit tests for escaping, regex matching, and upsert behavior |
| libs/javalib/src/mill/javalib/SonatypeCentralPublishModule.scala | Extend initGpgKeys command to pass keyserver URL + POM-derived hints |
| libs/javalib/pgp-worker/src/mill/javalib/pgp/worker/MillInitGpgKeysMain.scala | Expanded interactive workflow (upload/verify, local shell setup, optional gh secret upload) |
| integration/feature/init-gpg-publish/src/InitGpgPublishTests.scala | Integration test updated to use a local mock keyserver + new output expectations |
| libs/javalib/package.mill | MiMa exclusion for signature change + add util dependency for pgp-worker |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libs/javalib/pgp-worker/src/mill/javalib/pgp/worker/MillInitGpgKeysMain.scala
Outdated
Show resolved
Hide resolved
2902448 to
de9b0cc
Compare
de9b0cc to
051fd0a
Compare
Following up on your How To Publish to Maven Central Easily with Mill blog post, I'd like to propose a few additional automations:
ghCLI is authenticated, offers to upload secrets directly to the GitHub repositoryTechnical details
Usage of AI