2024-11-08 14:13:46 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
vars:
|
|
|
|
RELEASE:
|
2024-11-09 19:19:22 +00:00
|
|
|
sh: svu next
|
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
|
|
|
|
|
|
|
tasks:
|
|
|
|
release:tag:
|
2024-11-09 08:53:10 +00:00
|
|
|
desc: Create a new tag
|
2024-11-08 14:13:46 +00:00
|
|
|
cmds:
|
2024-11-09 19:19:22 +00:00
|
|
|
- git tag {{.RELEASE}}
|
2024-11-09 08:53:10 +00:00
|
|
|
- git push --tags
|
2024-11-08 14:13:46 +00:00
|
|
|
|
2024-11-09 08:53:10 +00:00
|
|
|
release:goreleaser:
|
|
|
|
desc: Create a new release with goreleaser
|
|
|
|
cmds:
|
|
|
|
- goreleaser release --clean
|
2024-11-08 14:13:46 +00:00
|
|
|
|
2024-11-09 08:53:10 +00:00
|
|
|
dorelease:
|
|
|
|
desc: Do all release steps
|
2024-11-09 19:19:22 +00:00
|
|
|
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
|
2024-11-09 08:59:51 +00:00
|
|
|
preconditions:
|
|
|
|
- sh: test "{{.BRANCH}}" == "main"
|
2024-11-08 14:13:46 +00:00
|
|
|
cmds:
|
|
|
|
- task: release:tag
|
2024-11-09 08:53:10 +00:00
|
|
|
- task: release:goreleaser
|
2024-11-09 09:13:52 +00:00
|
|
|
|
|
|
|
snapshot:
|
|
|
|
desc: Create a local snapshot release
|
|
|
|
cmds:
|
|
|
|
- goreleaser release --clean --snapshot
|