Skip to content

Commit 6f7cba7

Browse files
authored
Remove auto version bumping (#50)
1 parent 01cd9c0 commit 6f7cba7

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,6 @@ jobs:
2929
with:
3030
name: coverage
3131
path: coverage.*
32-
- id: git-auto-tag
33-
name: Bump version and push tag
34-
uses: anothrNick/[email protected]
35-
if: github.ref == 'refs/heads/master'
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
WITH_V: true
39-
DEFAULT_BUMP: patch
40-
- run: git tag ${{ steps.git-auto-tag.outputs.new_tag }}
41-
if: github.ref == 'refs/heads/master'
42-
- name: Release
43-
if: github.ref == 'refs/heads/master'
44-
run: make release
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4732
- name: Upload dist
4833
uses: actions/upload-artifact@v2
4934
with:

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ It includes:
1818
- dependency management using [Go Modules](https://github.com/golang/go/wiki/Modules),
1919
- linting with [golangci-lint](https://github.com/golangci/golangci-lint),
2020
- unit testing with [race detector](https://blog.golang.org/race-detector) and [code covarage HTML report](https://blog.golang.org/cover),
21-
- auto-tagging via [Github Tag Bump](https://github.com/marketplace/actions/github-tag-bump) GitHub Action,
2221
- releasing using [GoReleaser](https://github.com/goreleaser/goreleaser),
2322
- depdendencies scanning and vulnerabilities alerting thanks to [Dependabot](https://dependabot.com/go/),
2423
- [Visual Studio Code](https://code.visualstudio.com) configuration with [Go](https://code.visualstudio.com/docs/languages/go) and [Remote Container](https://code.visualstudio.com/docs/remote/containers) support.
@@ -43,10 +42,7 @@ It includes:
4342

4443
The release workflow is triggered each time a tag with `v` prefix is pushed.
4544

46-
This repo uses [Github Tag Bump](https://github.com/marketplace/actions/github-tag-bump) for auto tagging on master branch. Therfore, it automatically triggers the release workflow as well.
47-
48-
- Add `#minor` to your commit message to bump minor version.
49-
- Add `#major` to your commit message to bump major version. DANGER! Use it with caution and make sure you understand the consequences. More info: [Go Wiki](https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher), [Go Blog](https://blog.golang.org/v2-go-modules).
45+
_CAUTION_: Make sure to understand the consequences before you bump the major version. More info: [Go Wiki](https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher), [Go Blog](https://blog.golang.org/v2-go-modules).
5046

5147
## Maintainance
5248

@@ -60,7 +56,8 @@ Notable files:
6056
- [.golangci.yml](.golangci.yml) - golangci-lint configuration
6157
- [.goreleaser.yml](.goreleaser.yml) - GoReleaser configuration
6258
- [Makefile](Makefile) - Make targets used for development, [CI build](.github/workflows) and [.vscode/tasks.json](.vscode/tasks.json)
63-
- [tools.go](tools.go) - build tools
59+
- [go.mod](go.mod) - [Go module definition](https://github.com/golang/go/wiki/Modules#gomod),
60+
- [tools.go](tools.go) - [build tools](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module).
6461

6562
## FAQ
6663

@@ -122,6 +119,17 @@ Alternativly you can completly remove the usage of GoReleaser if you prefer hand
122119
123120
By default `go test` records code coverage for the package that is currently tested. If you want to get more accurate (cross-package) coverage, then consider using [go-acc](https://github.com/ory/go-acc). [Read more](https://www.ory.sh/golang-go-code-coverage-accurate/).
124121

122+
### How to automate generating git tags for next release version
123+
124+
Auto-tagging can be done e.g. by using GitHub Actions like:
125+
126+
- [Github Tag Bump](https://github.com/marketplace/actions/github-tag-bump),
127+
- [bumpr](https://github.com/marketplace/actions/bumpr-bump-version-when-merging-pull-request-with-specific-labels),
128+
- [Increment Semantic Version](https://github.com/marketplace/actions/increment-semantic-version),
129+
- [Github Tag](https://github.com/marketplace/actions/github-tag).
130+
131+
There are many possibilites how it can be achieved. Creating release tags manually is often the optimal approach. Take notice that this template executes a release workflow each time a git tag with `v` prefix is pushed.
132+
125133
## Contributing
126134

127135
Simply create an issue or a pull request.

0 commit comments

Comments
 (0)