This document describes the process for releasing a new version of the A2A Java SDK to Maven Central.
The release process involves:
- Updating version numbers across the project (automated)
- Opening and merging a release PR
- Tagging the release
- Automatic deployment to Maven Central
- Automatic GitHub release creation
- Incrementing to next SNAPSHOT version
- GitHub repository write access to
a2aproject/a2a-java - Maven Central account: namespace:
io.github.a2asdk
The following secrets must be configured in GitHub repository settings:
GPG_SIGNING_KEY: Private GPG key for artifact signingGPG_SIGNING_PASSPHRASE: Passphrase for the GPG keyCENTRAL_TOKEN_USERNAME: Maven Central username tokenCENTRAL_TOKEN_PASSWORD: Maven Central password token
The examples below use versions like 0.4.0.Alpha1-SNAPSHOT and 0.4.0.Alpha1 for demonstration. Be sure to substitute these with the actual versions for your release.
Use the provided script to update all version numbers:
# Preview changes (dry run)
./update-version.sh 0.4.0.Alpha1-SNAPSHOT 0.4.0.Alpha1 --dry-run
# Apply version update
./update-version.sh 0.4.0.Alpha1-SNAPSHOT 0.4.0.Alpha1The script automatically updates:
- ✅ All
pom.xmlfiles - ✅ All JBang script
//DEPSdeclarations inexamples/ - ✅ Validates the JBang update with built-in GMavenPlus validation
What gets updated:
pom.xml: 0.4.0.Alpha1-SNAPSHOT → 0.4.0.Alpha1
//DEPS io.github...: 0.4.0.Alpha1-SNAPSHOT → 0.4.0.Alpha1
Review the changes before committing:
# Review all changes
git diff
# Verify build works
mvn clean installCreate a pull request with the version update:
git checkout -b release/0.4.0.Alpha1
git add -A
git commit -m "chore: release 0.4.0.Alpha1"
git push origin release/0.4.0.Alpha1Open PR on GitHub with title: chore: release 0.4.0.Alpha1
The build-with-release-profile.yml workflow automatically verifies:
- ✅ Build succeeds with
-Preleaseprofile - ✅ All JavaDoc generation succeeds
- ✅ GPG signing works correctly
- ✅ JBang version validation passes
- ✅ No compilation or test failures
Important: This workflow tests the actual PR branch (not main) to catch issues before merge.
Wait for all CI checks to pass before proceeding.
Once all checks pass and the PR is approved:
- Merge the PR to
mainbranch - Do NOT squash - keep the release commit message intact for changelog
After the PR is merged to main:
# Switch to main and pull the merged changes
git checkout main
git pull origin main
# Create annotated tag
git tag -a v0.4.0.Alpha1 -m "Release 0.4.0.Alpha1"
# Push the tag (triggers deployment + GitHub release)
git push origin v0.4.0.Alpha1Pushing the tag triggers two workflows:
- Detects tag (pattern:
v?[0-9]+.[0-9]+.[0-9]+*) - Checks out the tagged commit
- Builds with
-Prelease -DskipTests - Signs all artifacts with GPG
- Deploys to Maven Central with auto-publish
⏱️ Deployment typically takes 30 minutes, but can vary.
- Detects the same tag
- Extracts version from tag name
- Generates release notes from commits since last release
- Creates GitHub release with:
- Auto-generated changelog
- Link to Maven Central artifacts
- Installation instructions
Check that artifacts are available:
Maven Central:
https://central.sonatype.com/artifact/io.github.a2asdk/a2a-java-sdk-parent/0.4.0.Alpha1
GitHub Release:
https://github.com/a2aproject/a2a-java/releases/tag/v0.4.0.Alpha1
Artifacts should include:
.jarfiles (main artifacts)-sources.jar(source code)-javadoc.jar(JavaDoc).pomfiles.ascGPG signatures for all artifacts
Prepare repository for next development cycle:
# Update to next SNAPSHOT version
./update-version.sh 0.4.0.Alpha1 0.4.0.Alpha2-SNAPSHOT
# Create and push PR
git checkout -b chore/bump-to-0.4.0.Alpha2-SNAPSHOT
git add -A
git commit -m "chore: bump version to 0.4.0.Alpha2-SNAPSHOT"
git push origin chore/bump-to-0.4.0.Alpha2-SNAPSHOTOpen PR, wait for CI, and merge.
Cause: JBang script dependencies don't match POM version
Fix:
# Re-run the update script to fix mismatches
./update-version.sh OLD_VERSION NEW_VERSION
# Or manually check:
grep -r "//DEPS io.github.a2asdk:" examples/Cause: GPG secrets are missing or incorrect
Fix: Repository maintainers - verify secrets in:
Settings → Secrets and variables → Actions
Check: GPG_SIGNING_KEY, GPG_SIGNING_PASSPHRASE
Cause: Normal Maven Central processing delays
Fix: Wait (up to 2 hours). Check status:
https://central.sonatype.com/publishing
Cause: Maven Central tokens expired or incorrect
Fix: Repository maintainers:
- Log in to Maven Central with the GitHub account for the a2asdk user.
- Generate new tokens:
User → Generate User Token - Update secrets:
CENTRAL_TOKEN_USERNAMEandCENTRAL_TOKEN_PASSWORD
Cause: Workflow failed or tag pattern didn't match
Fix:
# Check workflow runs
https://github.com/a2aproject/a2a-java/actions
# Manually create release if needed
https://github.com/a2aproject/a2a-java/releases/newNot possible - Maven Central does not allow artifact deletion.
Mitigation:
- Release a patch version with fixes (e.g.,
0.4.0.Alpha1→0.4.0.Alpha2) - Document issues in GitHub release notes
- Update documentation to recommend correct version
Follow semantic versioning with qualifiers:
- Major.Minor.Patch - Standard releases (e.g.,
1.0.0) - Major.Minor.Patch.AlphaN - Alpha releases (e.g.,
0.4.0.Alpha1) - Major.Minor.Patch.BetaN - Beta releases (e.g.,
0.3.0.Beta1) - Major.Minor.Patch.RCN - Release candidates (e.g.,
1.0.0.RC1) - -SNAPSHOT - Development versions (e.g.,
0.4.0.Alpha2-SNAPSHOT)
- Triggers: All PRs, all pushes
- Purpose: Verify builds with
-Preleaseprofile - Special: Tests actual PR branch (not main) using
pull_request_targetwith explicit checkout - Requires: GPG and Maven Central secrets
- Triggers: Tags matching
v?[0-9]+.[0-9]+.[0-9]+* - Purpose: Deploy to Maven Central
- Duration: ~30 minutes
- Requires: GPG and Maven Central secrets
- Triggers: Tags matching
v?[0-9]+.[0-9]+.[0-9]+* - Purpose: Create GitHub release with changelog
- Features: Auto-generated release notes, Maven Central links
- Requires: Default
GITHUB_TOKEN(automatic)
For questions or issues with the release process:
- Open an issue: https://github.com/a2aproject/a2a-java/issues
- Reference: Issue #532 - Release process improvements