GoTomato/Taskfile.yml

32 lines
773 B
YAML
Raw Normal View History

2024-11-09 19:28:44 +00:00
# Requirements:
# github.com/caarlos0/svu@latest
# github.com/goreleaser/goreleaser/v2@latest
version: '3'
tasks:
2024-11-09 20:44:24 +00:00
release:
desc: Create and publish an new release
2024-11-09 20:53:08 +00:00
vars:
RELEASE:
sh: svu next
BRANCH:
sh: git branch --show-current
COMMIT:
sh: git rev-parse --short --verify {{.BRANCH}}
2024-11-09 08:59:51 +00:00
preconditions:
- sh: test "{{.BRANCH}}" == "main"
2024-11-09 20:53:08 +00:00
msg: "You must be on the main branch to release"
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
cmds:
2024-11-09 20:44:24 +00:00
- git tag {{.RELEASE}}
- git push
- git push origin tag {{.RELEASE}}
- goreleaser release --clean
2024-11-09 09:13:52 +00:00
snapshot:
desc: Create a local snapshot release
cmds:
- goreleaser release --clean --snapshot