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:
org.a2aproject.sdk
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 release profile CI runs in two tiers:
Tier 1 (all PRs, no secrets):
- ✅ Build succeeds with
-Preleaseprofile (-DskipTests -Dgpg.skip=true -Drelease.auto.publish=false) - ✅ All JavaDoc generation succeeds
- ✅ JBang version validation passes
- ✅ No compilation failures
Tier 2 (allow-listed maintainers and pushes to main/0.3.x, with secrets):
- ✅ GPG signing works correctly
- ✅ Maven Central credentials are valid
- ✅ Full release profile build succeeds
Important: Tier 2 only runs for allow-listed actors (see build-with-release-profile-run.yml). Fork PRs from other contributors get Tier 1 only.
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/org.a2aproject.sdk/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
Create a new documentation version for the release:
# Copy dev docs to the new version folder
cp -r docs/content/dev docs/content/X.Y.Z.Final
# Create a new version data file
cp docs/data/versions/dev.yml docs/data/versions/X.Y.Z.Final.ymlEdit docs/data/versions/X.Y.Z.Final.yml:
- Set
labelto"X.Y.Z.Final" - Set
pathto"X.Y.Z.Final" - Set
sortOrderto the next number (higher than the previous release) - Set
defaultVersiontotrue - Set
devVersiontofalse - Adjust the
menulist if the new version adds or removes pages
Update the previous default version's data file (e.g., docs/data/versions/OLD_VERSION.yml):
- Set
defaultVersiontofalse
Review the new version's content for accuracy — ensure all pages reflect features available in this release.
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 org.a2aproject.sdk:" 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, manual dispatch
- Purpose: Build with
-Preleaseprofile without secrets; upload PR info for Tier 2 - Catches: Compilation, javadoc, plugin configuration issues
- Triggers:
workflow_runon Tier 1 completion - Purpose: Full release profile build with GPG signing and Maven Central credential validation
- Access: Allow-listed maintainers, pushes to
main/0.3.x, manual dispatch - 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