From 51cee9e947104ece95de6553bd06ce4f1d3cc866 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 24 Sep 2025 11:57:14 -0300 Subject: [PATCH] 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 ` + any args you pass to release - `git push --tags` Signed-off-by: Carlos Alexandro Becker --- Taskfile.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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