Skip to content

chore: migrate publishing to Maven Central and harden GitHub Actions - #127

Merged
kridai merged 1 commit into
mainfrom
chore/migrate-to-maven-central
Oct 22, 2026
Merged

kridai merged 1 commit into
mainfrom
chore/migrate-to-maven-central

Conversation

@kridai

@kridai kridai commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Mirrors sendgrid/java-http-client#151. OSSRH (oss.sonatype.org) has been shut down, so the current release path can't publish.

Release process (OSSRH -> Maven Central Portal)

  • nexus-staging-maven-plugin 1.6.8 replaced with central-publishing-maven-plugin 0.8.0 (publishingServerId: central, autoPublish: true).
  • Deploy job server-id: ossrh changed to central.
  • Removed the deprecated org.sonatype.oss:oss-parent parent POM.
  • Added a <developers> block (required by Central Portal), reusing Twilio API <api@twilio.com>. Please confirm that's the right contact.

SONATYPE_USERNAME / SONATYPE_PASSWORD must be Central Portal user tokens, not the old OSSRH credentials.

GitHub Actions hardening

  • All actions pinned to commit SHAs, with Dependabot (github-actions and maven) keeping them current.
  • Per-job permissions, ubuntu-x64 runners, and a repository_owner == 'sendgrid' guard.
  • PR title lint uses twilio/sdk-actions/semantic-pr-title; GitHub Release uses twilio/sdk-actions/github-release (fetch-depth: 0, changelog-file: CHANGELOG.md, footer uses ${{ github.ref_name }}).
  • Slack notifications and the Datadog metric are commented out (not on the allowlist).
  • Removed update-dependencies.yml (PAT + direct push to main) in favour of Dependabot.

Testing

  • YAML parses; mvn -Prelease -Dgpg.skip -DskipTests package produces the jar, -sources.jar and -javadoc.jar.
  • An actual Central upload can only be verified on the next tag.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kridai
kridai merged commit 452a952 into main Oct 22, 2026
7 checks passed
@kridai
kridai deleted the chore/migrate-to-maven-central branch October 22, 2026 08:46
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.

2 participants