Whetstone uses an automated release process triggered by GitHub Releases. The workflow automatically handles testing, publishing, tagging, and preparing the next development version.
-
Update Version in gradle.properties
# Change VERSION_NAME from X.Y.Z-SNAPSHOT to X.Y.Z # Example: 1.1.5-SNAPSHOT → 1.1.5 vim gradle.properties
-
Open a PR for the Release Version
mainis protected — you cannot push directly. Open a PR titledPrepare for release X.Y.Zcontaining only thegradle.propertieschange above, get review, and merge.git checkout -b release/X.Y.Z git commit -am "Prepare for release X.Y.Z" git push -u origin release/X.Y.Z gh pr create --base main --fill -
Create a GitHub Release (only after the prep PR is merged to
main)- Go to GitHub Releases
- Click "Choose a tag" and create a new tag
X.Y.Z(e.g.,1.2.3). - Write release notes describing changes
- Click "Publish release"
-
Automated Publishing
- GitHub Actions automatically:
- Validates version format (must be X.Y.Z, no SNAPSHOT)
- Runs full test suite
- Publishes to Maven Central (automatic promotion enabled)
- Commits next SNAPSHOT version to main (X.Y.Z+1-SNAPSHOT)
- GitHub Actions automatically:
-
Done!
- Verify the release on Maven Central
- Check that main branch was automatically updated to next SNAPSHOT version
When you create a GitHub release:
- Version Validation: Reads
VERSION_NAMEfrom gradle.properties and validates format (X.Y.Z, no SNAPSHOT) - Testing: Runs
./gradlew buildto ensure all tests pass - Publishing: Publishes artifacts to Maven Central with automatic promotion
- Next Version: Automatically commits
X.Y.(Z+1)-SNAPSHOTto main branch
The post-release SNAPSHOT bump pushes a commit directly to the protected main branch.
That push is performed by the delivery-hero-tech org bot and depends on:
- The
GH_TOKENrepo secret (the bot's PAT) being available to.github/workflows/publish-release.yml— wired viaactions/checkout'stoken:input so the persisted git credentials carry the bot identity for the rest of the job. delivery-hero-techbeing included in themainbranch-protection bypass list ("Allow specified actors to bypass required pull requests"). Without this the push is rejected withGH006: Protected branch update failed.
If a fork needs to run this workflow, configure a GH_TOKEN secret with an
equivalent bot/PAT and add that identity to the fork's branch-protection bypass list.
- Release versions:
1.2.3(no SNAPSHOT suffix) — landed onmainvia the prep PR before you create the GitHub Release - Development versions:
1.2.4-SNAPSHOT— always onmainbetween releases; auto-committed by the bot after each release - Tags:
X.Y.Z— created by you when you publish the GitHub Release. The workflow never inspects the tag name; onlygradle.properties:VERSION_NAMEis validated.
If the automated workflow is broken and you must publish manually:
# 1. From a release prep PR branch (gradle.properties already at X.Y.Z), run tests
./gradlew clean build
# 2. Propagate parent properties into the includeBuild plugin module
# (mirrors what the workflow does — required because the gradle plugin
# is a composite build and reads its own gradle.properties).
cat gradle.properties >> whetstone-gradle-plugin/gradle.properties
# 3. Publish
./gradlew clean -x test -x lint publish :whetstone-gradle-plugin:publish \
-PmavenCentralAutomaticPublishing=true
# 4. Restore the working tree (don't commit the cat-append)
git checkout -- whetstone-gradle-plugin/gradle.properties
# 5. Tag and push the tag
git tag -a X.Y.Z -m "Version X.Y.Z"
git push origin X.Y.Z
# 6. Open a follow-up PR bumping gradle.properties to X.Y.(Z+1)-SNAPSHOT
# (main is protected — you cannot push the bump directly).Note: Using GitHub Releases is strongly recommended as it provides full automation and audit trail.
Error: Release version cannot contain SNAPSHOT: X.Y.Z-SNAPSHOT
- The tag points at a commit whose
gradle.propertiesstill has-SNAPSHOT. Cause: you created the tag before (or without) merging the prep PR. Fix: merge the prep PR (sogradle.propertiesonmainreadsX.Y.Z), delete the tag, and re-create the GitHub Release pointing at the merged prep commit.
Error: Invalid version format 'X.Y.Z'. Expected format: X.Y.Z
- The workflow validates
VERSION_NAMEfromgradle.properties(it never inspects the tag). The value must match^[0-9]+\.[0-9]+\.[0-9]+$— three dot-separated integers, no suffixes. Fixgradle.propertiesand open a new prep PR.
Release workflow failed on tests
- The workflow runs the full test suite before publishing.
- Fix failing tests on
main, then create a new GitHub Release.
Maven Central not showing new version
- Automatic publishing is enabled, but Maven Central can take a few minutes to sync.
- Check Sonatype Nexus for deployment status.
Next SNAPSHOT version not committed to main
- Most common cause:
GH_TOKENis missing or the bot is not on the branch-protection bypass list — see Required repo configuration. The defaultGITHUB_TOKENcannot push to a protectedmain, and the failure surfaces only at the bump step (after the artifact is already published to Maven Central). - Other causes: check the GitHub Actions logs for the "Bump to next SNAPSHOT version" step.
- Workaround: open a PR manually bumping
gradle.propertiestoX.Y.(Z+1)-SNAPSHOT.