33 lines
694 B
YAML
33 lines
694 B
YAML
version: '3'
|
|
|
|
vars:
|
|
RELEASE:
|
|
sh: svu next --strip-prefix
|
|
VERSIONFILE: version.txt
|
|
COMMITMSG: "chore: bump version to v{{.RELEASE}}"
|
|
CURRENTBRANCH:
|
|
sh: git branch --show-current
|
|
|
|
tasks:
|
|
release:tag:
|
|
preconditions:
|
|
- test {{.CURRENTBRANCH}} == "main"
|
|
cmds:
|
|
- git tag v{{.RELEASE}}
|
|
|
|
release:file:
|
|
preconditions:
|
|
- test {{.CURRENTBRANCH}} == "main"
|
|
cmds:
|
|
- echo {{.RELEASE}} >{{.VERSIONFILE}}
|
|
- git add {{.VERSIONFILE}}
|
|
- git commit -m "{{.COMMITMSG}}"
|
|
|
|
release:push:
|
|
aliases: [dorelease]
|
|
cmds:
|
|
- task: release:file
|
|
- task: release:tag
|
|
- git push
|
|
- git push --tags
|
|
- goreleaser release
|