Releasing#

genop and genop-runtime are released in lockstep on matching version tags (v0.1.0, v0.2.0, …): a cross-repo change lands as a genop-runtime branch, merged and tagged first, then a genop branch bumps go.mod to that tag and does its own side of the change.

genop-testing is a third, independent module (root package and matchers) — it releases on its own cadence and is not part of the lockstep. Its go.mod is deliberately pinned to the ecosystem floor (rather than the newest Kubernetes/controller-runtime versions) so it never force-upgrades consumers; that floor is a deliberate choice, not staleness — don’t “fix” it by bumping without checking why it’s pinned.

Working on the three repositories together#

Clone genop, genop-runtime and genop-testing side by side and create a Go workspace in their parent directory (it is git-ignored):

go work init ./genop ./genop-runtime ./genop-testing

A cross-repo change can then be built and tested before anything is tagged. If a go.mod already requires the upcoming, not yet published tag, also point that version at the local checkout:

go work edit -replace gitlab.com/kornercloud.dev/genop-runtime@v0.2.0=./genop-runtime

go mod tidy ignores the workspace: run it once the tags are published.

What ships where#

  • cmd/cli/tpl/go.mod.tpl emits genop-runtime {{ .genopVersion }} and genop-testing {{ .genopTestingVersion }} into every generated project’s go.mod. genopVersion defaults to the CLI binary’s own Version ldflag; genopTestingVersion defaults to DefaultGenopTestingVersion in cmd/cli/root.go — bump that constant on a genop-testing release.
  • genop/go.mod itself requires both genop-runtime and genop-testing — both require lines are load-bearing: test/e2e/utils_test.go’s findGenopRuntimeVersion() / findGenopTestingVersion() parse them to pass --genop-version / --genop-testing-version when scaffolding test fixtures. Never delete either require line.

Publishing a new genop release#

  1. Merge the corresponding genop-runtime change and tag it first.
  2. Bump this repo’s go.mod to the new genop-runtime tag.
  3. Add a row to Version compatibility for the new tag.
  4. Tag genop with the matching version.

What CI does on a tag#

Pushing a vX.Y.Z tag is what publishes a Go module: there is nothing to upload. On such a tag, each repository’s pipeline runs lint and tests, then:

  • release-notes lists the commits since the previous tag and asks proxy.golang.org for the new version, so it is cached and shows up on pkg.go.dev right away;
  • release creates the GitLab Release with those notes.

Pipelines never start on a plain push (see workflow: in .gitlab-ci.yml): only on tags, merge requests, and “Run pipeline” by a maintainer. The documentation site is deployed on release tags.

The cross-repository steps (bumping go.mod to the new genop-testing or genop-runtime tag) stay manual. Only maintainers can push v* tags (protected tags).

See Version compatibility for the current pinned versions.