GoTomato/Taskfile.yml

35 lines
834 B
YAML

# yaml-language-server: $schema=https://taskfile.dev/schema.json
#
# Requirements:
# github.com/caarlos0/svu@latest
# github.com/goreleaser/goreleaser/v2@latest
version: '3'
vars:
VERSIONFILE: version.txt
RELEASE:
sh: svu next
BRANCH:
sh: git branch --show-current
COMMIT:
sh: git rev-parse --short --verify {{.BRANCH}}
COMMITMSG: "chore: bump version to {{.RELEASE}}"
tasks:
release:
desc: Create and publish an new release
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
preconditions:
- sh: test "{{.BRANCH}}" == "main"
cmds:
- git tag {{.RELEASE}}
- git push
- git push origin tag {{.RELEASE}}
- goreleaser release --clean
snapshot:
desc: Create a local snapshot release
cmds:
- goreleaser release --clean --snapshot