This document describes the automated release process for xAPI Java.
The release process is fully automated via GitHub Actions. Creating a release is as simple as:
- Click "Create Release" in GitHub UI
- Enter tag (e.g.,
v1.2.0) - Publish
- Wait for workflow to complete ✅
All version management, building, testing, and deployment happens automatically.
- Navigate to the Releases page
- Click "Draft a new release"
- Choose a tag: Enter the tag version in the format:
vX.Y.Z(e.g.,v1.2.0)- The tag must start with
vfollowed by semantic version numbers - Example:
v1.1.16,v2.0.0,v1.2.3
- The tag must start with
- Target: Select the branch to release from (typically
main)- The workflow will automatically detect and use this branch
- Enter a release title (e.g., "Release 1.2.0")
- Add release notes describing the changes
- Click "Publish release"
Once you publish the release, the "Automated Release" workflow will:
- ✅ Validate the tag format (must be
vX.Y.Z) - ✅ Detect the target branch (auto-detected from release)
- ✅ Delete the user-created tag (will be recreated properly)
- ✅ Run Maven release:prepare to:
- Update all
pom.xmlfiles to the release version - Commit the version change
- Create the release tag pointing to the release commit
- Update
pom.xmlfiles to the next SNAPSHOT version - Commit the next development iteration
- Update all
- ✅ Run Maven release:perform to:
- Check out the release tag
- Build and test the release version
- Deploy artifacts to Maven Central with GPG signatures
- ✅ Push commits and tag back to the originating branch
Workflow Diagram:
User Action: Create Release (tag: v1.2.0, target: main)
↓
GitHub: Creates tag v1.2.0 → commit A (from main)
↓
Workflow: Detects target branch (main)
↓
Workflow: Deletes user-created tag v1.2.0
↓
Workflow: Runs release:prepare
↓
- Commit B: pom.xml → 1.2.0 (release version)
- Creates tag v1.2.0 → commit B
- Commit C: pom.xml → 1.2.1-SNAPSHOT (next dev version)
↓
Workflow: Runs release:perform
↓
- Checks out tag v1.2.0 (commit B)
- Builds and tests
- Deploys to Maven Central
↓
Workflow: Pushes commits B & C to main
↓
Workflow: Pushes tag v1.2.0 → commit B
↓
Result:
- Tag v1.2.0 → commit B (release version)
- Main branch → commit C (next SNAPSHOT: 1.2.1-SNAPSHOT)
- Artifacts deployed to Maven Central
- Check the Actions tab to ensure the workflow completed successfully
- Verify the target branch (e.g.,
main) has two new commits:- Release commit:
[maven-release-plugin] prepare release vX.Y.Z - Development commit:
[maven-release-plugin] prepare for next development iteration
- Release commit:
- Verify artifacts are available on Maven Central
- Main branch (
main) (or other target branch): Contains development code with-SNAPSHOTversions- After each release, receives two commits from Maven release plugin:
- Release commit: Version update to release version (X.Y.Z)
- Development commit: Version update to next development version (X.Y.Z+1-SNAPSHOT)
- The HEAD always points to the next development version
- After each release, receives two commits from Maven release plugin:
- Release tags (
vX.Y.Z): Created by Maven release plugin- Points to the release version commit (first commit)
- Used for reproducible builds and deployments
- No separate release branches: The release workflow pushes directly to the originating branch
If the automated release workflow fails:
-
Check the workflow logs in the Actions tab
-
Identify the failed step and review the error message
-
Common issues and solutions:
Issue Solution Invalid tag format Use format vX.Y.Z(e.g.,v1.2.0, not1.2.0orv1.2)Missing secrets Ensure GPG keys and Maven credentials are configured in repository secrets Build failures Fix build issues on main branch first, then retry release Test failures Fix failing tests on main branch first, then retry release -
After fixing issues:
- Delete the failed release and tag in GitHub UI
- Important: Reset your target branch if commits were already pushed:
# If release:prepare pushed commits before failure git fetch origin git checkout main # or your target branch git reset --hard origin/main~2 # Remove the 2 release commits git push -f origin main
- Create a new release with the same tag
The workflow typically takes 5-10 minutes. If it's taking longer:
- Check if tests are running (this is the longest step)
- Check for any hanging processes in the workflow logs
- You can cancel the workflow run and restart it
If artifacts don't appear on Maven Central after a successful workflow:
- Check the Central Portal for deployment status: https://central.sonatype.com/
- Deployment can take up to 2 hours to sync to Maven Central
- Check for any deployment errors in the workflow logs
- Verify GPG signing was successful (check for GPG-related errors)