GoTomato/Taskfile.yml

36 lines
834 B
YAML
Raw Normal View History

# yaml-language-server: $schema=https://taskfile.dev/schema.json
#
2024-11-09 19:28:44 +00:00
# Requirements:
# github.com/caarlos0/svu@latest
# github.com/goreleaser/goreleaser/v2@latest
version: '3'
vars:
2024-11-08 15:00:57 +00:00
VERSIONFILE: version.txt
RELEASE:
sh: svu next
2024-11-08 15:00:57 +00:00
BRANCH:
sh: git branch --show-current
COMMIT:
sh: git rev-parse --short --verify {{.BRANCH}}
COMMITMSG: "chore: bump version to {{.RELEASE}}"
tasks:
2024-11-09 20:44:24 +00:00
release:
desc: Create and publish an new release
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
2024-11-09 08:59:51 +00:00
preconditions:
- sh: test "{{.BRANCH}}" == "main"
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