Skip to content

feat: automated project version management and docker release#6

Draft
davidgamez wants to merge 2 commits into
mainfrom
feat/git-versioning
Draft

feat: automated project version management and docker release#6
davidgamez wants to merge 2 commits into
mainfrom
feat/git-versioning

Conversation

@davidgamez

@davidgamez davidgamez commented Jun 25, 2026

Copy link
Copy Markdown
Member

Description

Derive version from git tags + snapshot/release Docker publishing

Automates the API version so it always matches the release tag, and publishes
Docker images for both main snapshots and tagged releases. No more hand-editing
pom.xml per release.

Changes

  • Git-driven version — adds maven-git-versioning-extension (.mvn/). A tag
    vX.Y.Z builds version X.Y.Z; any other build is 0.0.0-SNAPSHOT. pom.xml
    keeps a placeholder version and is never edited for releases.
  • Publishing (docker.yml) — both variants (stable-core and validator-core
    -snapshot) build on every event; pushes happen on non-PR events only. latest
    is applied on releases, stable variant only.
  • Fork-aware image labelorg.opencontainers.image.source is set from the
    building repo (lower-cased github.repository) so forks link to their own
    package; sensible default for local builds.
  • Docs — new Releasing and Using the published images sections; updated
    Versions and CI tables.

Docker versioning

Image tags follow <apiVersion>-validator<validatorCoreVersion>. The API version
comes from git (release tag or 0.0.0-SNAPSHOT), and the validator core version
comes from the build variant. The two are independent: a main build is an API
snapshot
, which is not the same as the validator-core snapshot.

On merge to main (no release tag), the API version resolves to
0.0.0-SNAPSHOT, so both variants publish as API snapshots:

Variant Tag published on merge to main
stable-core 0.0.0-SNAPSHOT-validator8.0.1
snapshot-core 0.0.0-SNAPSHOT-validator8.0.2-SNAPSHOT

latest is not moved by main merges — these are dev/preview images.

On release (vX.Y.Z tag / GitHub Release), the API version resolves to X.Y.Z:

Variant Tag published on release
stable-core X.Y.Z-validator8.0.1 + latest
snapshot-core X.Y.Z-validator8.0.2-SNAPSHOT

On pull requests, both variants build (to validate the Dockerfile) but nothing
is published.

Verified

  • Branch build → 0.0.0-SNAPSHOT; tag v1.2.31.2.3.
  • End-to-end Docker build; source label honors the fork override.
  • docker.yml is valid YAML.

@davidgamez davidgamez changed the title feat: automated project version management feat: automated project version management and docker release Jun 25, 2026
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