From a3304e6fdb431a9ab3e8748703dba02831958cfe Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Fri, 4 Sep 2026 08:42:47 -0700 Subject: [PATCH 1/3] Document go-bump companion action --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/README.md b/README.md index 46c3315..ee89084 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,52 @@ go get -tool github.com/bcomnes/goversion/v2 ## Usage +### GitHub Actions companion + +[`go-bump`](https://github.com/bcomnes/go-bump) is the companion GitHub Action for running a `goversion` release in CI. `goversion` remains the local-first workflow: register it as a project-pinned Go tool so contributors can create, validate, publish, and recover releases locally. `go-bump` uses that same pinned tool and adds GitHub Actions input handling, credentials, Git identity, lifecycle hooks, and outputs. + +After committing the `goversion` tool dependency, a release workflow can use the moving `v0` action reference: + +```yaml +permissions: + contents: write + +steps: + - uses: actions/checkout@v7 + with: + ref: ${{ github.event.repository.default_branch }} + fetch-depth: 0 + persist-credentials: false + + - uses: actions/setup-go@v7 + with: + go-version-file: go.mod + + - uses: bcomnes/go-bump@v0 + with: + version-type: patch + github-token: ${{ github.token }} + pre-publish: go test ./... +``` + +For a nested module, set `go-version-file` to its `go.mod` and pass the module directory as `workdir`; other versioning paths are relative to that directory: + +```yaml +- uses: actions/setup-go@v7 + with: + go-version-file: go/go.mod + +- uses: bcomnes/go-bump@v0 + with: + workdir: go + version-file: internal/version/version.go + version-type: patch + github-token: ${{ github.token }} + pre-publish: make release-validation +``` + +`goversion` derives the canonical tag, including the module-directory prefix for nested modules. For custom releases, pass a semantic version such as `0.1.0`, not a tag such as `v0.1.0`. See the [`go-bump` documentation](https://github.com/bcomnes/go-bump#readme) for its complete inputs, outputs, publication controls, and recovery behavior. + ### Command-Line Interface The `goversion` CLI defaults to the module in the current directory and `./version.go`. Use `-workdir` to select a root or nested module without changing the caller's working directory. Relative `-version-file`, `-file`, `-bump-file`, and `-post-bump` paths are resolved within that workdir. From 91b6196b4f83a2b1cdd92bf3f518554713805342 Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Fri, 4 Sep 2026 09:27:21 -0700 Subject: [PATCH 2/3] Update README logo placement --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee89084..b638e27 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# goversion +![goversion: Bump. Tag. Publish.](logos/og.png) -![goversion logo](logo.png) +# goversion [![Actions Status][action-img]][action-url] [![SocketDev][socket-image]][socket-url] @@ -376,3 +376,5 @@ For detailed API documentation, visit [PkgGoDev][pkg-go-dev-url]. ## License This project is licensed under the MIT License. + +![Go gopher operating the version machine](logo.png) From cca8d656c94d3186d1195aa8f070445f157ce242 Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Fri, 4 Sep 2026 09:29:23 -0700 Subject: [PATCH 3/3] Link to maintained go-bump examples --- README.md | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/README.md b/README.md index b638e27..75d8c65 100644 --- a/README.md +++ b/README.md @@ -122,47 +122,7 @@ go get -tool github.com/bcomnes/goversion/v2 [`go-bump`](https://github.com/bcomnes/go-bump) is the companion GitHub Action for running a `goversion` release in CI. `goversion` remains the local-first workflow: register it as a project-pinned Go tool so contributors can create, validate, publish, and recover releases locally. `go-bump` uses that same pinned tool and adds GitHub Actions input handling, credentials, Git identity, lifecycle hooks, and outputs. -After committing the `goversion` tool dependency, a release workflow can use the moving `v0` action reference: - -```yaml -permissions: - contents: write - -steps: - - uses: actions/checkout@v7 - with: - ref: ${{ github.event.repository.default_branch }} - fetch-depth: 0 - persist-credentials: false - - - uses: actions/setup-go@v7 - with: - go-version-file: go.mod - - - uses: bcomnes/go-bump@v0 - with: - version-type: patch - github-token: ${{ github.token }} - pre-publish: go test ./... -``` - -For a nested module, set `go-version-file` to its `go.mod` and pass the module directory as `workdir`; other versioning paths are relative to that directory: - -```yaml -- uses: actions/setup-go@v7 - with: - go-version-file: go/go.mod - -- uses: bcomnes/go-bump@v0 - with: - workdir: go - version-file: internal/version/version.go - version-type: patch - github-token: ${{ github.token }} - pre-publish: make release-validation -``` - -`goversion` derives the canonical tag, including the module-directory prefix for nested modules. For custom releases, pass a semantic version such as `0.1.0`, not a tag such as `v0.1.0`. See the [`go-bump` documentation](https://github.com/bcomnes/go-bump#readme) for its complete inputs, outputs, publication controls, and recovery behavior. +See the [`go-bump` documentation](https://github.com/bcomnes/go-bump#readme) for current workflow examples, requirements, inputs, outputs, nested-module configuration, publication controls, and recovery behavior. ### Command-Line Interface