41 lines
913 B
YAML
41 lines
913 B
YAML
# Requirements:
|
|
# github.com/caarlos0/svu@latest
|
|
# github.com/goreleaser/goreleaser/v2@latest
|
|
|
|
version: '3'
|
|
|
|
vars:
|
|
VERSIONFILE: version.txt
|
|
RELEASE:
|
|
sh: svu next
|
|
BRANCH:
|
|
sh: git branch --show-current
|
|
COMMIT:
|
|
sh: git rev-parse --short --verify {{.BRANCH}}
|
|
COMMITMSG: "chore: bump version to {{.RELEASE}}"
|
|
|
|
tasks:
|
|
release:tag:
|
|
desc: Create a new tag
|
|
cmds:
|
|
- git tag {{.RELEASE}}
|
|
- git push --tags
|
|
|
|
release:goreleaser:
|
|
desc: Create a new release with goreleaser
|
|
cmds:
|
|
- goreleaser release --clean
|
|
|
|
dorelease:
|
|
desc: Do all release steps
|
|
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
|
|
preconditions:
|
|
- sh: test "{{.BRANCH}}" == "main"
|
|
cmds:
|
|
- task: release:tag
|
|
- task: release:goreleaser
|
|
|
|
snapshot:
|
|
desc: Create a local snapshot release
|
|
cmds:
|
|
- goreleaser release --clean --snapshot
|