on main help sign in
chore: add task release

you can use it as: ```sh task release -- -m 'some short description' ``` and it'll: - figure out the next tag using svu - check if you're on main - check branch is clean - drop the nightly tag (it's recreated, so if you have an old one, `git push --tags` will complain about it) - `git tag --sign <next version>` + any args you pass to release - `git push --tags` Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

commit51cee9e947104ece95de6553bd06ce4f1d3cc866 authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateWed 24 Sep 2025, 11:57 (1 year ago) parent63eda4d
1 file changed+17
Taskfile.yaml+17
Taskfile.yaml+17
@@ -84,3 +84,20 @@ tasks:
8484 - echo "Generated schema.json"
8585 generates:
8686 - schema.json
87+
88+ release:
89+ desc: Create and push a new tag following semver
90+ vars:
91+ NEXT:
92+ sh: go run github.com/caarlos0/svu@latest next
93+ prompt: "This will release {{.NEXT}}. Continue?"
94+ preconditions:
95+ - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]'
96+ msg: Not on main branch
97+ - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]"
98+ msg: "Git is dirty"
99+ cmds:
100+ - git tag -d nightly
101+ - git tag --sign {{.NEXT}} {{.CLI_ARGS}}
102+ - echo "pushing {{.NEXT}}..."
103+ - git push origin --tags