Bitty City uses automated publishing to Maven Central via GitHub Actions. Each module is versioned and released independently. The release process is triggered by creating a tag with the module name prefix (e.g., outie-v0.10.4) on the main branch.
Each module maintains its own version in its gradle.properties file:
| Module | Version File |
|---|---|
| common | common/gradle.properties |
| innie | innie/gradle.properties |
| outie | outie/gradle.properties |
Before releasing, ensure you have:
- Write access to the repository
- Access to the required GitHub secrets:
SONATYPE_CENTRAL_USERNAMESONATYPE_CENTRAL_PASSWORDGPG_SECRET_KEYGPG_SECRET_PASSPHRASE
-
Set the module and release version:
export MODULE=outie export RELEASE_VERSION=A.B.C
-
Create a release branch:
git checkout -b release/$MODULE-$RELEASE_VERSION
-
Update
CHANGELOG.mdwith changes since the last release. Follow the existingCHANGELOG.mdformat, which is derived from this guide -
Update the version in the module's
gradle.properties:sed -i "" \ "s/VERSION_NAME=.*/VERSION_NAME=$RELEASE_VERSION/g" \ $MODULE/gradle.properties
-
Commit and push the release branch:
git add . git commit -m "Prepare for release $MODULE $RELEASE_VERSION" git push origin release/$MODULE-$RELEASE_VERSION
-
Create a pull request to merge the release branch into main:
gh pr create --title "Release $MODULE $RELEASE_VERSION" --body "Release $MODULE version $RELEASE_VERSION"
-
Review and merge the pull request to main
Once the release PR is merged to main:
-
Pull the latest changes from main:
git checkout main git pull origin main
-
Create a tag with the module prefix:
git tag -a $MODULE-v$RELEASE_VERSION -m "Release $MODULE version $RELEASE_VERSION" git push origin $MODULE-v$RELEASE_VERSION
Once the tag is pushed, the Publish to Maven Central workflow will automatically:
- Parse the module name and version from the tag
- Build and sign the module's artifacts with GPG
- Publish to Maven Central via Sonatype
Note: It can take 10-30 minutes for artifacts to appear on Maven Central after successful publishing.
- Go to GitHub Releases
- Select the tag you just created (
$MODULE-v$RELEASE_VERSION) - Copy the release notes from
CHANGELOG.mdinto the release description - Publish the release
When releasing modules with dependencies, publish in order:
common(no dependencies)innieandoutie(depend oncommon)
If you've made changes to common, release it first before releasing dependent modules.
- If the GitHub Action fails, check the workflow logs for specific error messages
- Common issues include:
- Invalid GPG key or passphrase
- Incorrect Sonatype credentials
- Version conflicts (if the version was already published)
- Network connectivity issues
If the automated publishing fails and you need to manually intervene:
- Check the Sonatype Nexus staging repository
- Drop any failed artifacts from the staging repository
- Fix the issue and re-tag the release (delete the old tag first)
- Re-run the workflow
If you don't have access to the required secrets or Sonatype account, contact the project maintainers.
Each module release includes:
- Main JAR with compiled classes
- Sources JAR
- Javadoc JAR
- POM file
All artifacts are signed with GPG and published to Maven Central under xyz.block.bittycity.