diff --git a/Taskfile.yaml b/Taskfile.yaml index 443531fa2435d5557536a4d2e6d88014ea4a5677..7f821f584704393dffc750795e0c48ecdf5ea8ab 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -84,3 +84,20 @@ tasks: - echo "Generated schema.json" generates: - schema.json + + release: + desc: Create and push a new tag following semver + vars: + NEXT: + sh: go run github.com/caarlos0/svu@latest next + prompt: "This will release {{.NEXT}}. Continue?" + preconditions: + - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]' + msg: Not on main branch + - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]" + msg: "Git is dirty" + cmds: + - git tag -d nightly + - git tag --sign {{.NEXT}} {{.CLI_ARGS}} + - echo "pushing {{.NEXT}}..." + - git push origin --tags