Skip to content

ci(build): automate Maven Central release with AWS OIDC#23

Merged
bluestreak01 merged 18 commits into
mainfrom
steve-automate-mvn-release
May 18, 2026
Merged

ci(build): automate Maven Central release with AWS OIDC#23
bluestreak01 merged 18 commits into
mainfrom
steve-automate-mvn-release

Conversation

@sklarsa

@sklarsa sklarsa commented May 13, 2026

Copy link
Copy Markdown
Contributor

Automates publication of org.questdb:questdb-client to Maven Central. A tag matching X.Y.Z triggers a GitHub Actions workflow that assumes an AWS IAM role via OIDC, fetches GPG and Sonatype credentials from AWS Secrets Manager, verifies the tag matches the POM version, then signs and publishes through the Sonatype Central Portal.

The release runbook lives in artifacts/release/README.md.

Required configuration

Before the first release, the following must exist on the repository.

Repository variables:

  • MAVEN_RELEASE_AWS_REGION — AWS region of the release secret.

Repository secrets:

  • MAVEN_RELEASE_AWS_ROLE_ARN — IAM role assumed via OIDC; must trust the GitHub OIDC provider for this repo and grant secretsmanager:GetSecretValue on the secret below.
  • MAVEN_RELEASE_AWS_SECRET_ARN — ARN of the AWS Secrets Manager entry holding the release credentials.

GitHub environment maven-release:

  • Required reviewers configured so a human approves each publish.
  • The release job runs inside this environment.

AWS Secrets Manager entry (JSON at MAVEN_RELEASE_AWS_SECRET_ARN) with keys:

  • MAVEN_GPG_PRIVATE_KEY — ASCII-armored GPG signing key.
  • MAVEN_GPG_PASSPHRASE — passphrase for the signing key.
  • MAVEN_CENTRAL_USERNAME — Sonatype Central Portal user token name.
  • MAVEN_CENTRAL_PASSWORD — Sonatype Central Portal user token value.

sklarsa and others added 17 commits May 13, 2026 13:32
Revert "[maven-release-plugin] prepare for next development iteration"
and "[maven-release-plugin] prepare release 1.2.2", which were created
by a local mvn release:prepare dry-run while validating the new
workflow. The 1.2.2 tag was never pushed and no 1.2.2 artifact was
published, so keeping the version-bump commits on the branch would
leave main claiming a 1.2.2 release that did not happen.
- Add -N to mvn help:evaluate so it runs only against the parent POM.
  Without it, Maven recurses into core and examples and forceStdout
  prints the version once per module, producing multi-line output
  that fails both the SNAPSHOT check and the tag-equality check.

- Rewrite the "Publish to Maven Central" section in the release
  README. The workflow no longer uses workflow_dispatch with inputs;
  it triggers on a *.*.* tag push and does not push commits or tags.
ideoma
ideoma previously approved these changes May 18, 2026
@bluestreak01 bluestreak01 merged commit 2dcf1ea into main May 18, 2026
10 checks passed
@bluestreak01 bluestreak01 deleted the steve-automate-mvn-release branch May 18, 2026 17:06
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.

3 participants