feat: add release management via Task
- create `Taskfile.yml` - initial tasks - add new version tag - push to remote and run goreleaser - create snapshot via goreleaser
This commit is contained in:
parent
05a8701a26
commit
2f337bb9d6
1 changed files with 32 additions and 0 deletions
32
Taskfile.yml
Normal file
32
Taskfile.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
# github.com/go-task/task/v3/cmd/task@latest
|
||||
# Requirements:
|
||||
# github.com/caarlos0/svu@latest
|
||||
# github.com/goreleaser/goreleaser/v2@latest
|
||||
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
|
||||
release:
|
||||
desc: Create and publish an new release
|
||||
vars:
|
||||
RELEASE:
|
||||
sh: svu next
|
||||
BRANCH:
|
||||
sh: git branch --show-current
|
||||
COMMIT:
|
||||
sh: git rev-parse --short --verify {{.BRANCH}}
|
||||
preconditions:
|
||||
- sh: test "{{.BRANCH}}" == "main"
|
||||
msg: "You must be on the main branch to release"
|
||||
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
|
||||
cmds:
|
||||
- git tag {{.RELEASE}}
|
||||
- git push
|
||||
- git push origin tag {{.RELEASE}}
|
||||
- goreleaser release --clean
|
||||
|
||||
snapshot:
|
||||
desc: Create a local snapshot release
|
||||
cmds:
|
||||
- goreleaser release --clean --snapshot
|
Loading…
Reference in a new issue