File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,3 +12,27 @@ tasks:
1212 desc : Run tests
1313 cmds :
1414 - go test -race -count 4 -cpu 1,4 ./... {{.CLI_ARGS}}
15+
16+ release :
17+ desc : Create and push a new tag following semver
18+ vars :
19+ NEXT :
20+ sh : svu next --always || go run github.com/caarlos0/svu/v3@latest next --always
21+ prompt : " This will release {{.NEXT}}. Continue?"
22+ preconditions :
23+ - sh : ' [ $(git symbolic-ref --short HEAD) = "main" ]'
24+ msg : Not on main branch
25+ - sh : " [ $(git status --porcelain=2 | wc -l) = 0 ]"
26+ msg : " Git is dirty"
27+ - sh : ' gh run list --workflow build.yml --commit $(git rev-parse HEAD) --status success --json conclusion -q ".[0].conclusion" | grep -q success'
28+ msg : " Test build for this commit failed or not present"
29+ cmds :
30+ - task : fetch-tags
31+ - git commit --allow-empty -m "{{.NEXT}}"
32+ - git tag --annotate --sign -m "{{.NEXT}}" {{.NEXT}} {{.CLI_ARGS}}
33+ - echo "Pushing {{.NEXT}}..."
34+ - git push origin main --follow-tags
35+
36+ fetch-tags :
37+ cmds :
38+ - git fetch --tags
You can’t perform that action at this time.
0 commit comments