2024-11-09 09:42:26 +00:00
|
|
|
# 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
|
|
|
|
|
2024-11-08 14:13:46 +00:00
|
|
|
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}}?
|
2024-11-08 14:13:46 +00:00
|
|
|
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
|