GoTomato/Taskfile.yml

32 lines
701 B
YAML

version: '3'
vars:
VERSIONFILE: version.txt
RELEASE:
sh: svu next --strip-prefix
BRANCH:
sh: git branch --show-current
COMMIT:
sh: git rev-parse --short --verify {{.BRANCH}}
COMMITMSG: "chore: bump version to v{{.RELEASE}}"
tasks:
release:tag:
cmds:
- git tag v{{.RELEASE}}
release:file:
cmds:
- echo {{.RELEASE}} >{{.VERSIONFILE}}
- git add {{.VERSIONFILE}}
- git commit -m "{{.COMMITMSG}}"
release:push:
aliases: [dorelease]
prompt: Create new release v{{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
cmds:
- task: release:file
- task: release:tag
- git push
- git push --tags
- goreleaser release