Skip to content

Latest commit

 

History

History
93 lines (66 loc) · 3.14 KB

File metadata and controls

93 lines (66 loc) · 3.14 KB

Release Process

This project uses JReleaser for automated releases to GitHub Releases and Maven Central.

Creating a Release

  1. Ensure all changes are committed and pushed

    git status  # Should be clean
  2. Trigger the release workflow

    • Go to Actions → Release
    • Click Run workflow
    • Enter the release version (e.g., 1.0.0)
    • Click Run workflow
  3. What the workflow does

    • Updates all pom.xml versions to the release version
    • Builds and signs artifacts (JARs, sources, javadoc) for both modules
    • Deploys staging artifacts to local directories
    • Commits and pushes the version change
    • Creates a GitHub Release with auto-generated changelog
    • Publishes both miniterm and miniterm-ffm to Maven Central
    • Bumps versions to the next -SNAPSHOT and pushes
  4. Verify the release

Local Testing (Optional)

# Validate JReleaser configuration
./mvnw jreleaser:config

# Test build with release profile (produces staged artifacts)
./mvnw clean deploy jreleaser:assemble -Prelease

# Inspect staged artifacts (all modules land here)
ls target/staging-deploy/

# Do a dry-run of the full release
./mvnw jreleaser:full-release -Djreleaser.dry.run

First-Time Setup

1. Generate GPG Keys

gpg --gen-key
gpg --list-secret-keys --keyid-format=long

# Export keys (replace KEY_ID with your key ID)
gpg --armor --export KEY_ID > public.key
gpg --armor --export-secret-keys KEY_ID > private.key

# Publish to key server
gpg --keyserver keyserver.ubuntu.com --send-keys KEY_ID

2. Register at Maven Central

  1. Sign up at https://central.sonatype.com/
  2. Verify namespace ownership for org.codejive
  3. Generate a user token (username + password)

3. Configure GitHub Secrets

Add at Settings → Secrets → Actions:

Secret Description
GPG_PUBLIC_KEY Contents of public.key
GPG_SECRET_KEY Contents of private.key
GPG_PASSPHRASE Passphrase used when generating the GPG key
MAVENCENTRAL_USERNAME Maven Central token username
MAVENCENTRAL_PASSWORD Maven Central token password

GITHUB_TOKEN is provided automatically by GitHub Actions.

4. Optional: Protected Environment

For an extra approval gate, create a jreleaser environment under Settings → Environments, add the same secrets there, and uncomment the environment: jreleaser line in .github/workflows/release.yml.

Version Management

  • Development versions use -SNAPSHOT suffix (e.g., 1.0.0-SNAPSHOT)
  • The workflow automatically bumps to the next patch SNAPSHOT after each release
  • Use semantic versioning: MAJOR.MINOR.PATCH
  • Use conventional commits for automatic changelog entries (feat:, fix:, docs:, etc.)