Skip to content

Instantly share code, notes, and snippets.

View pawellabaj's full-sized avatar

Paweł Łabaj pawellabaj

View GitHub Profile
@sualeh
sualeh / how_to_sign_and_release_to_the_central_repository_with_github_actions.md
Last active July 14, 2025 12:33
How to Sign and Release to The Central Repository with GitHub Actions

How to Sign and Release to The Central Repository with GitHub Actions

Warning

OSSRH Sunset: "As of June 30, 2025 OSSRH has reached end of life and has been shut down. All OSSRH namespaces have been migrated to Central Publisher Portal."

GitHub allows automated builds using GitHub Actions. A commonly asked question is how to release artifacts (packaged Java jars) built by Maven and Gradle to The Central Repository. The GitHub Actions documentation provides only part of the answer.

So, first, configure your Maven project for staging artifacts to The Central Repository, by reading through Configuring Your Project for Deployment and following those steps. Please make sure that the maven-gpg-plugin is configured to prevent gpg from using PIN entry programs, as follows:

<