22
33This document describes the automated release process for xAPI Java.
44
5+ ## Overview
6+
7+ The release process is ** fully automated** via GitHub Actions. Creating a release is as simple as:
8+ 1 . Click "Create Release" in GitHub UI
9+ 2 . Enter tag (e.g., ` v1.2.0 ` )
10+ 3 . Publish
11+ 4 . Wait for workflow to complete ✅
12+
13+ All version management, building, testing, and deployment happens automatically.
14+
515## Automated Release Process
616
717The release process is fully automated via GitHub Actions. To create a new release:
@@ -21,19 +31,48 @@ The release process is fully automated via GitHub Actions. To create a new relea
2131
2232Once you publish the release, the "Automated Release" workflow will:
2333
24- 1 . ✅ Validate the tag format
34+ 1 . ✅ Validate the tag format (must be ` vX.Y.Z ` )
25352 . ✅ Extract the version number from the tag
26363 . ✅ Create a ` release-X.Y.Z ` branch from the release tag
27374 . ✅ Update all ` pom.xml ` files to the release version
28385 . ✅ Commit the version change
29- 6 . ✅ Build and deploy artifacts to Maven Central with:
39+ 6 . ✅ ** Run full test suite** to verify the release
40+ 7 . ✅ Build and deploy artifacts to Maven Central with:
3041 - Compiled JARs
3142 - Source JARs
3243 - Javadoc JARs
3344 - GPG signatures
34- 7 . ✅ Update the release tag to point to the release commit
35- 8 . ✅ Update ` pom.xml ` files to the next SNAPSHOT version
36- 9 . ✅ Push all commits to the release branch
45+ 8 . ✅ Update the release tag to point to the release commit
46+ 9 . ✅ Update ` pom.xml ` files to the next SNAPSHOT version
47+ 10 . ✅ Push all commits to the release branch
48+
49+ ** Workflow Diagram:**
50+ ```
51+ User Action: Create Release (tag: v1.2.0)
52+ ↓
53+ GitHub: Creates tag v1.2.0 → commit A (from main)
54+ ↓
55+ Workflow: Checkout tag v1.2.0
56+ ↓
57+ Workflow: Create branch release-1.2.0
58+ ↓
59+ Workflow: Update pom.xml to 1.2.0 → commit B
60+ ↓
61+ Workflow: Run tests (mvn verify)
62+ ↓
63+ Workflow: Build & deploy to Maven Central
64+ ↓
65+ Workflow: Move tag v1.2.0 to commit B
66+ ↓
67+ Workflow: Update pom.xml to 1.2.1-SNAPSHOT → commit C
68+ ↓
69+ Workflow: Push branch release-1.2.0
70+ ↓
71+ Result:
72+ - Tag v1.2.0 → commit B (release version)
73+ - Branch release-1.2.0 → commit C (next SNAPSHOT)
74+ - Artifacts deployed to Maven Central
75+ ```
3776
3877### Step 3: Verify Release
3978
@@ -76,20 +115,54 @@ For special cases, you can still manually trigger the deprecated "Maven Release
76115
77116If the automated release workflow fails:
78117
79- 1 . Check the workflow logs in the Actions tab
80- 2 . Common issues:
81- - Invalid tag format (must be ` vX.Y.Z ` )
82- - Missing secrets (GPG keys, Maven credentials)
83- - Build or test failures
84- 3 . You can re-run the workflow after fixing issues
118+ 1 . ** Check the workflow logs** in the [ Actions tab] ( https://github.com/BerryCloud/xapi-java/actions )
119+ 2 . ** Identify the failed step** and review the error message
120+ 3 . ** Common issues and solutions:**
121+
122+ | Issue | Solution |
123+ | -------| ----------|
124+ | Invalid tag format | Use format ` vX.Y.Z ` (e.g., ` v1.2.0 ` , not ` 1.2.0 ` or ` v1.2 ` ) |
125+ | Missing secrets | Ensure GPG keys and Maven credentials are configured in repository secrets |
126+ | Build failures | Fix build issues on main branch first, then retry release |
127+ | Test failures | Fix failing tests on main branch first, then retry release |
128+ | Branch already exists | Delete existing branch (see below) before creating new release |
129+ | Permission denied | Ensure workflow has ` contents: write ` permission |
130+
131+ 4 . ** After fixing issues:**
132+ - Delete the failed release and tag in GitHub UI
133+ - Delete the release branch if it was created: ` git push origin --delete release-X.Y.Z `
134+ - Create a new release with the same tag
85135
86136### Release Branch Already Exists
87137
88138If you need to re-release the same version:
89139
90- 1 . Delete the existing release branch: ` git push origin --delete release-X.Y.Z `
91- 2 . Delete the release and tag in GitHub UI
92- 3 . Create a new release with the same version
140+ 1 . Delete the existing release branch:
141+ ``` bash
142+ git push origin --delete release-X.Y.Z
143+ ```
144+ 2 . Delete the existing release in GitHub UI:
145+ - Go to Releases → Click on the release → Delete release
146+ 3 . Delete the tag:
147+ - Go to Tags → Find the tag → Delete tag
148+ 4 . Create a new release with the same version tag
149+
150+ ### Workflow Stuck or Taking Too Long
151+
152+ The workflow typically takes 5-10 minutes. If it's taking longer:
153+
154+ 1 . Check if tests are running (this is the longest step)
155+ 2 . Check for any hanging processes in the workflow logs
156+ 3 . You can cancel the workflow run and restart it
157+
158+ ### Artifacts Not Appearing on Maven Central
159+
160+ If artifacts don't appear on Maven Central after a successful workflow:
161+
162+ 1 . Check the Central Portal for deployment status: https://central.sonatype.com/
163+ 2 . Deployment can take up to 2 hours to sync to Maven Central
164+ 3 . Check for any deployment errors in the workflow logs
165+ 4 . Verify GPG signing was successful (check for GPG-related errors)
93166
94167## Required Secrets
95168
0 commit comments