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.
The release process is fully automated via GitHub Actions. To create a new release:
- Navigate to the Releases page
- Click "Draft a new release"
- 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
- 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) - ✅ Extract the version number from the tag
- ✅ Create a
release-X.Y.Zbranch from the release tag - ✅ Update all
pom.xmlfiles to the release version - ✅ Commit the version change
- ✅ Run full test suite to verify the release
- ✅ Build and deploy artifacts to Maven Central with:
- Compiled JARs
- Source JARs
- Javadoc JARs
- GPG signatures
- ✅ Update the release tag to point to the release commit
- ✅ Update
pom.xmlfiles to the next SNAPSHOT version - ✅ Push all commits to the release branch
Workflow Diagram:
User Action: Create Release (tag: v1.2.0)
↓
GitHub: Creates tag v1.2.0 → commit A (from main)
↓
Workflow: Checkout tag v1.2.0
↓
Workflow: Create branch release-1.2.0
↓
Workflow: Update pom.xml to 1.2.0 → commit B
↓
Workflow: Run tests (mvn verify)
↓
Workflow: Build & deploy to Maven Central
↓
Workflow: Move tag v1.2.0 to commit B
↓
Workflow: Update pom.xml to 1.2.1-SNAPSHOT → commit C
↓
Workflow: Push branch release-1.2.0
↓
Result:
- Tag v1.2.0 → commit B (release version)
- Branch release-1.2.0 → commit C (next SNAPSHOT)
- Artifacts deployed to Maven Central
- Check the Actions tab to ensure the workflow completed successfully
- Verify the release branch was created:
release-X.Y.Z - Verify artifacts are available on Maven Central
- Main branch (
main): Contains development code with-SNAPSHOTversions - Release branches (
release-X.Y.Z): Created automatically for each release- Contains two commits:
- Version update to release version (X.Y.Z)
- Version update to next development version (X.Y.Z+1-SNAPSHOT)
- Contains two commits:
- Release tags (
vX.Y.Z): Points to the release version commit
This project follows Semantic Versioning:
- MAJOR version (X): Incompatible API changes
- MINOR version (Y): Backward-compatible functionality additions
- PATCH version (Z): Backward-compatible bug fixes
The automated workflow increments the PATCH version for the next development iteration.
For special cases, you can still manually trigger the deprecated "Maven Release (Manual)" workflow:
- Go to Actions
- Select "Maven Release (Manual - Deprecated)"
- Click "Run workflow"
Note: This method is deprecated and should only be used if the automated process fails.
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 Branch already exists Delete existing branch (see below) before creating new release Permission denied Ensure workflow has contents: writepermission -
After fixing issues:
- Delete the failed release and tag in GitHub UI
- Delete the release branch if it was created:
git push origin --delete release-X.Y.Z - Create a new release with the same tag
If you need to re-release the same version:
- Delete the existing release branch:
git push origin --delete release-X.Y.Z
- Delete the existing release in GitHub UI:
- Go to Releases → Click on the release → Delete release
- Delete the tag:
- Go to Tags → Find the tag → Delete tag
- Create a new release with the same version 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)
The following GitHub secrets must be configured for releases to work:
OSSRH_USERNAME: Sonatype OSSRH usernameOSSRH_TOKEN: Sonatype OSSRH tokenMAVEN_GPG_PRIVATE_KEY: GPG private key for signing artifactsMAVEN_GPG_PASSPHRASE: Passphrase for the GPG private key
Snapshot versions are automatically published to Maven Central's snapshot repository when changes are pushed to release-* branches. See the "Publish snapshot to the Sonatype OSSRH" workflow.