This project uses JReleaser for automated releases to GitHub and Maven Central.
Ensure GitHub secrets are configured (see First-Time Setup below if not already configured).
-
Ensure all changes are committed and pushed
git status # Should be clean -
Trigger the release workflow
- Go to Actions → Release
- Click Run workflow
- Enter the release version (e.g.,
1.0.0) - Click Run workflow
-
Monitor the workflow
- The workflow will:
- Update version in pom.xml
- Build and sign artifacts
- Deploy to Maven Central
- Create GitHub release with changelog
- Bump to next SNAPSHOT version
- The workflow will:
-
Verify the release
- Check GitHub Releases
- Check Maven Central (may take ~30 minutes)
Test the configuration before releasing:
# Validate configuration
./mvnw jreleaser:config
# Test build with release profile
./mvnw clean install -Prelease
# Check assembled artifacts
ls -la target/staging-deploy/# Generate key
gpg --gen-key
# Get key ID
gpg --list-secret-keys --keyid-format=long
# Export keys
gpg --armor --export YOUR_KEY_ID > public.key
gpg --armor --export-secret-keys YOUR_KEY_ID > private.key
# Publish to key server
gpg --keyserver keyserver.ubuntu.com --send-keys YOUR_KEY_ID- Sign up at https://central.sonatype.com/
- Verify ownership of your namespace (e.g.,
org.codejive.tproxy) - Get username and password/token
Add these secrets at Settings → Secrets and variables → Actions:
| Secret Name | Description | How to Get It |
|---|---|---|
GPG_PUBLIC_KEY |
Your GPG public key | Copy entire contents of public.key file |
GPG_SECRET_KEY |
Your GPG private key | Copy entire contents of private.key file |
GPG_PASSPHRASE |
Passphrase for your GPG key | The passphrase you entered when generating the key |
MAVENCENTRAL_USERNAME |
Maven Central username | From your Maven Central account token |
MAVENCENTRAL_PASSWORD |
Maven Central password | From your Maven Central account token |
Note: The GITHUB_TOKEN is automatically provided by GitHub Actions and doesn't need to be configured.
For additional security, you can create a protected environment:
- Go to Settings → Environments
- Click "New environment"
- Name it
jreleaser - Add protection rules:
- ✅ Required reviewers (recommended for production releases)
- ✅ Wait timer (optional delay before deployment)
- Add the same secrets to this environment
Then uncomment this line in .github/workflows/release.yml:
# environment: jreleaser- Development versions use
-SNAPSHOTsuffix (e.g.,1.0.0-SNAPSHOT) - Release versions have no suffix (e.g.,
1.0.0) - The workflow automatically bumps to next SNAPSHOT after release
- Use semantic versioning: MAJOR.MINOR.PATCH