2024-11-08 14:13:46 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
vars:
|
2024-11-08 15:00:57 +00:00
|
|
|
VERSIONFILE: version.txt
|
2024-11-08 14:13:46 +00:00
|
|
|
RELEASE:
|
|
|
|
sh: svu next --strip-prefix
|
2024-11-08 15:00:57 +00:00
|
|
|
BRANCH:
|
|
|
|
sh: git branch --show-current
|
|
|
|
COMMIT:
|
|
|
|
sh: git rev-parse --short --verify {{.BRANCH}}
|
2024-11-08 14:13:46 +00:00
|
|
|
COMMITMSG: "chore: bump version to v{{.RELEASE}}"
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
release:tag:
|
|
|
|
cmds:
|
|
|
|
- git tag v{{.RELEASE}}
|
|
|
|
|
|
|
|
release:file:
|
|
|
|
cmds:
|
|
|
|
- echo {{.RELEASE}} >{{.VERSIONFILE}}
|
|
|
|
- git add {{.VERSIONFILE}}
|
|
|
|
- git commit -m "{{.COMMITMSG}}"
|
|
|
|
|
|
|
|
release:push:
|
|
|
|
aliases: [dorelease]
|
2024-11-08 15:00:57 +00:00
|
|
|
prompt: Create new release v{{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
|
2024-11-08 14:13:46 +00:00
|
|
|
cmds:
|
|
|
|
- task: release:file
|
|
|
|
- task: release:tag
|
|
|
|
- git push
|
|
|
|
- git push --tags
|
|
|
|
- goreleaser release
|