Skip to content

DX-2103: auto-derive release version (semver bump)#33

Merged
lloyd-cio merged 1 commit into
mainfrom
dx-2103-auto-semver
Jun 12, 2026
Merged

DX-2103: auto-derive release version (semver bump)#33
lloyd-cio merged 1 commit into
mainfrom
dx-2103-auto-semver

Conversation

@lloyd-cio

@lloyd-cio lloyd-cio commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What

Structural follow-up item 6 from DX-2103: stop requiring a hand-typed release version.

  • version input is now optional; blank = auto-bump the latest vX.Y.Z tag.
  • new bump input (patch/minor/major, default patch) picks the level.
  • an explicit version still works as an override.

How it works

Resolution happens once in the validate_dispatch job (resolve-version) and is plumbed downstream as a job output. The tag re-dispatch already carries an explicit version=<tag>, so the publish jobs (github_release, npm_publish, github_packages_publish) are unchanged and keep using inputs.version.

Changes

  • release-version.js — add pure bumpVersion(base, level).
  • release-workflow.js — add latestTag() + resolveVersion() and a resolve-version command; export both.
  • release.yml — optional version + new bump input; validate_dispatch resolves and exposes outputs.version; tag_and_dispatch and the dry-run job consume that output.
  • release-workflow.test.js — tests for bumpVersion (levels, v-prefix, bad inputs) and the resolveVersion override path.

Validation

  • node .github/scripts/release-workflow.test.js passes.
  • Live derivation against current tags (latest v0.0.11): patch→0.0.12, minor→0.1.0, major→1.0.0, VERSION_INPUT=v2.5.02.5.0.
  • YAML parses.
  • After merge: a dry-run dispatch with blank version derives + validates without publishing; first real blank-version release exercises tag creation end-to-end.

Safety

The explicit version override remains throughout, so this can't strand a release. Tag-exists / registry-version guards are unchanged (they run after resolution).

Make the typed `version` input optional and add a `bump` input
(patch/minor/major, default patch). When version is blank, resolve the next
version from the latest vX.Y.Z tag and bump it; an explicit version still
works as an override.

Resolution happens once in validate_dispatch and is plumbed downstream as a
job output. The tag re-dispatch already carries an explicit version, so the
publish jobs are unchanged. Adds bumpVersion + resolveVersion with tests.
@lloyd-cio lloyd-cio requested review from joeybaer and nunofgs June 12, 2026 19:18
@lloyd-cio lloyd-cio merged commit 7aadfd6 into main Jun 12, 2026
3 checks passed
@lloyd-cio lloyd-cio deleted the dx-2103-auto-semver branch June 12, 2026 21:00
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