GoTomato/Taskfile.yml

34 lines
694 B
YAML
Raw Normal View History

version: '3'
vars:
RELEASE:
sh: svu next --strip-prefix
VERSIONFILE: version.txt
COMMITMSG: "chore: bump version to v{{.RELEASE}}"
2024-11-08 15:00:57 +00:00
CURRENTBRANCH:
sh: git branch --show-current
tasks:
release:tag:
2024-11-08 15:00:57 +00:00
preconditions:
- test {{.CURRENTBRANCH}} == "main"
cmds:
- git tag v{{.RELEASE}}
release:file:
2024-11-08 15:00:57 +00:00
preconditions:
- test {{.CURRENTBRANCH}} == "main"
cmds:
- echo {{.RELEASE}} >{{.VERSIONFILE}}
- git add {{.VERSIONFILE}}
- git commit -m "{{.COMMITMSG}}"
release:push:
aliases: [dorelease]
cmds:
- task: release:file
- task: release:tag
- git push
- git push --tags
- goreleaser release