Skip to content

build: derive version from Git tag via axion-release plugin#50

Merged
jimisola merged 2 commits intomainfrom
feat/axion-release-versioning
Apr 17, 2026
Merged

build: derive version from Git tag via axion-release plugin#50
jimisola merged 2 commits intomainfrom
feat/axion-release-versioning

Conversation

@jimisola
Copy link
Copy Markdown
Member

@jimisola jimisola commented Apr 17, 2026

Summary

Fixes the publish pipeline building 0.1.0 when releasing 0.1.1.

  • Adds pl.allegro.tech.build.axion-release:1.18.0
  • Configures tag.prefix = '' to match existing plain-semver tags (0.1.1, not v0.1.1)
  • Configures versionCreator 'simple' so snapshots are x.y.z-SNAPSHOT (not x.y.z-branch-name)
  • Replaces version = '0.1.0' with version = scmVersion.version

Version resolution behaviour:

Situation Resolved version
On a tagged commit (release) 0.1.1 (exact tag)
Any commit after tag 0.1.2-SNAPSHOT

No CI workflow changes needed — the plugin reads from git state at build time.

Test plan

  • ./gradlew currentVersion shows 0.1.2-SNAPSHOT (not 0.1.0, not branch-suffixed)
  • ./gradlew test passes
  • After merge and tagging 0.1.2, the publish workflow resolves exactly 0.1.2

Replace hardcoded version = '0.1.0' with scmVersion.version from the
pl.allegro.tech.build.axion-release plugin. Tag prefix is set to empty
string to match existing plain-semver tags (e.g. 0.1.1, not v0.1.1).

On a tagged commit the version resolves to the exact tag; on subsequent
commits it becomes a SNAPSHOT (e.g. 0.1.2-SNAPSHOT), removing the need
to manually update build.gradle before each release.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
…sion

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola self-assigned this Apr 17, 2026
@jimisola jimisola merged commit a907334 into main Apr 17, 2026
12 checks passed
@jimisola jimisola deleted the feat/axion-release-versioning branch April 17, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant