Skip to content

Change release workflow to ZeroVer and encapsulate version info#48

Merged
silv-io merged 3 commits intomainfrom
silv-io/flc-414
Feb 25, 2026
Merged

Change release workflow to ZeroVer and encapsulate version info#48
silv-io merged 3 commits intomainfrom
silv-io/flc-414

Conversation

@silv-io
Copy link
Copy Markdown
Member

@silv-io silv-io commented Feb 24, 2026

Motivation

Going with ZeroVer first keeps our options open. We can still decide later if we want CalVer or a proper SemVer 1.0.0 release. The March release doesn't need to be 0.1.0 either. It's fine if we end up at 0.6.0 after some internal iterations. We won't focus on the version number anyway. See PRO-220.

Also, it turns out tags pushed with GITHUB_TOKEN don't trigger other workflows. That's why CI wasn't running automatically after creating a release tag. Using PRO_ACCESS_TOKEN fixes this. GitHub docs

Changes

  • Switch from CalVer to ZeroVer (v0.minor.patch)
  • Add bump type input (minor/patch) to release tag workflow
  • Use PAT for tag push to trigger CI
  • Move version info to internal/version package

Tests

Verified goreleaser ldflags locally:

$ goreleaser build --snapshot --clean --single-target
$ ./dist/lstk_darwin_arm64_v8.0/lstk version
lstk 0.1.0-SNAPSHOT-ff50a42 (ff50a42..., 2026-02-24T16:27:40Z)

@silv-io silv-io marked this pull request as ready for review February 24, 2026 16:44
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ceb2095 and b70ef1d.

📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • .github/workflows/create-release-tag.yml
  • .goreleaser.yaml
  • cmd/login.go
  • cmd/root.go
  • cmd/version.go
  • cmd/version_test.go
  • internal/version/version.go

📝 Walkthrough

Walkthrough

Version management refactored from CalVer to semantic versioning (v0.x.y format). Version variables moved from cmd package to internal/version package with exported getter functions. CI/CD workflows updated to validate and generate new tag format. Build tooling and all code references updated accordingly.

Changes

Cohort / File(s) Summary
CI/CD Workflows
.github/workflows/ci.yml, .github/workflows/create-release-tag.yml
Tag validation and generation updated from CalVer format (YYYY.M.patch) to semantic versioning (v0.minor.patch). Added workflow input bump (patch/minor) to control version increment logic. Tag discovery and filtering adjusted for v0.*.* pattern.
Version Package
internal/version/version.go
New package with three unexported variables (version, commit, buildDate) and three exported getter functions (Version(), Commit(), BuildDate()) to expose runtime build information set via ldflags at build time.
Command Layer
cmd/root.go, cmd/login.go, cmd/version.go
Updated to import and call version.Version(), version.Commit(), and version.BuildDate() from internal/version package instead of using local package variables.
Command Tests
cmd/version_test.go
Removed test setup/teardown for version variables. Changed assertions from exact string matching to structural validation (checking for "lstk " prefix and presence of parentheses).
Build Configuration
.goreleaser.yaml
Updated ldflags to reference internal/version.* variables instead of cmd.* for version injection at build time.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • carole-lavillonniere
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: switching to ZeroVer versioning and moving version information into an internal package.
Description check ✅ Passed The description directly relates to the changeset, explaining the motivation for ZeroVer adoption, detailing specific changes made, and providing test verification.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch silv-io/flc-414

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@silv-io silv-io merged commit 0c1f8ad into main Feb 25, 2026
8 checks passed
@silv-io silv-io deleted the silv-io/flc-414 branch February 25, 2026 07:54
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.

2 participants