Skip to content

feat(gha): publish Maven artifacts to Maven Central#64

Merged
so0k merged 3 commits intomainfrom
configure-publishing-to-Maven-Central
Mar 22, 2026
Merged

feat(gha): publish Maven artifacts to Maven Central#64
so0k merged 3 commits intomainfrom
configure-publishing-to-Maven-Central

Conversation

@so0k
Copy link
Copy Markdown
Contributor

@so0k so0k commented Mar 22, 2026

Summary

Builds on #63 by @krzema12 — replaces the GitHub Packages Maven job with Maven Central publishing instead of adding a second job alongside it (consistent with the NuGet.org restoration in #50).

  • Replace (not add alongside) the GitHub Packages Maven job
  • Use MAVEN_SERVER_ID=central-ossrh (publib #1667) instead of MAVEN_ENDPOINT
  • Remove unnecessary permissions: packages: write
  • Remove MAVEN_STAGING_PROFILE_ID (not needed for central-ossrh)
  • Fix inconsistent MAVEN_ENDPOINT between release.yml (central.sonatype.com) and release_next.yml (hashicorp.oss.sonatype.org)

Required secrets

All 4 secrets have been deployed via IaC:

Secret Status
MAVEN_USERNAME Deployed
MAVEN_PASSWORD Deployed
MAVEN_GPG_PRIVATE_KEY Deployed
MAVEN_GPG_PRIVATE_KEY_PASSPHRASE Deployed

Closes #13

Test plan

  • Generate GPG key (RSA 4096), publish to keyserver.ubuntu.com
  • Deploy all 4 secrets via terraform apply
  • Merge and verify first release publishes to https://central.sonatype.com/artifact/io.cdktn/cdktn

🤖 Generated with Claude Code

krzema12 and others added 2 commits March 20, 2026 22:29
Instead of adding a second Maven Central job alongside GitHub Packages,
replace the existing job entirely — consistent with the NuGet.org
restoration approach (PR #50).

Fixes:
- Use MAVEN_SERVER_ID=central-ossrh (publib PR #1667) instead of MAVEN_ENDPOINT
- Remove unnecessary permissions: packages: write
- Remove MAVEN_STAGING_PROFILE_ID (not needed for central-ossrh)
- Fix inconsistent MAVEN_ENDPOINT between release.yml and release_next.yml
  (was https://central.sonatype.com vs https://hashicorp.oss.sonatype.org)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@so0k so0k requested a review from a team as a code owner March 22, 2026 15:17
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@so0k so0k merged commit 630fbd5 into main Mar 22, 2026
500 of 504 checks passed
@so0k so0k deleted the configure-publishing-to-Maven-Central branch March 22, 2026 15:50
jsteinich added a commit that referenced this pull request Mar 27, 2026
### feat
- feat(gha): publish Maven artifacts to Maven Central
[\#64](#64)
- feat: restore NuGet.org publishing
[\#50](#50)
- feat(provider-generator): don't emit property params
[\#43](#43)


### fix
- fix(cli): Pin init template to TypesScript 5.x
[\#74](#74)
- fix(gha): fix Go releases and update git identity
[\#65](#65)
- fix(provider-generator): handle inline comments with brackets in
variable type parsing
[\#61](#61)
- fix: DEP0044 in TerraformOutput
[\#2](#2)


### chore
- chore: Upgrade dependencies for all
[\#69](#69)
- chore(gha): Adding base14 Scout CI/CD observability workflow to
instrument all the github actions.
[\#52](#52)
- chore(deps): Upgrade minimatch to 5.1.8
[\#49](#49)
- chore: add cdktn keyword to all packages
[\#46](#46)
- chore: update links to point to cdktn.io
[\#45](#45)
- chore: update more references to cdktf
[\#44](#44)
- chore: fix typo in CONTRIBUTING.md
[\#42](#42)
- chore(deps): Upgrade validator to 13.15.22
[\#38](#38)
- chore(deps): Upgrade glob to 10.5.0
[\#30](#30)
- chore: Upgrade dependencies for all
[\#22](#22)
- chore: Upgrade dependencies for lib
[\#18](#18)
- chore(deps): bump the github-actions-backward-compatible group with 4
updates [\#15](#15)
- chore(deps): bump the github-actions-breaking group with 11 updates
[\#14](#14)


### refactor
- refactor(hcl2cdk): global setup/teardown along with parallel tests to
speed the b…
[\#41](#41)
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.

Setup Publishing to Maven Central

2 participants