Compare commits

...

5 commits

2 changed files with 13 additions and 26 deletions

View file

@ -1,10 +1,10 @@
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
before:
hooks:
- rm -fr ./dist
- go mod tidy
builds:

View file

@ -1,3 +1,9 @@
# yaml-language-server: $schema=https://taskfile.dev/schema.json
#
# Requirements:
# github.com/caarlos0/svu@latest
# github.com/goreleaser/goreleaser/v2@latest
version: '3'
vars:
@ -11,36 +17,17 @@ vars:
COMMITMSG: "chore: bump version to {{.RELEASE}}"
tasks:
release:tag:
desc: Create a new tag
cmds:
- git tag {{.RELEASE}}
- git push --tags
release:file:
desc: Update version.txt
generates:
- version.txt
cmds:
- echo {{.RELEASE}} >{{.VERSIONFILE}}
- git add {{.VERSIONFILE}}
- git commit -m "{{.COMMITMSG}}"
- git push
release:goreleaser:
desc: Create a new release with goreleaser
cmds:
- goreleaser release --clean
dorelease:
desc: Do all release steps
release:
desc: Create and publish an new release
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
preconditions:
- sh: test "{{.BRANCH}}" == "main"
cmds:
- task: release:file
- task: release:tag
- task: release:goreleaser
- git tag {{.RELEASE}}
- git push
- git push origin tag {{.RELEASE}}
- goreleaser release --clean
snapshot:
desc: Create a local snapshot release