Compare commits

...

4 commits

Author SHA1 Message Date
25f237f73a add snapshot task 2024-11-09 10:13:52 +01:00
62b7190fcd only run dorelase in main branch 2024-11-09 09:59:51 +01:00
9ffe12bd6d split tasks into indiviual units
create standalone `goreleaser` task
create standalone `dorelease` task
2024-11-09 09:54:44 +01:00
4fd1e60fde gorelaser: do force-remove ./dist 2024-11-09 09:51:07 +01:00
2 changed files with 21 additions and 6 deletions

View file

@ -4,7 +4,6 @@ version: 2
before:
hooks:
- rm -fr ./dist
- go mod tidy
builds:

View file

@ -12,21 +12,37 @@ vars:
tasks:
release:tag:
desc: Create a new tag
cmds:
- git tag v{{.RELEASE}}
- git push --tags
release:file:
desc: Update version.txt
generates:
- version.txt
cmds:
- echo {{.RELEASE}} >{{.VERSIONFILE}}
- git add {{.VERSIONFILE}}
- git commit -m "{{.COMMITMSG}}"
- git push
release:push:
aliases: [dorelease]
release:goreleaser:
desc: Create a new release with goreleaser
cmds:
- goreleaser release --clean
dorelease:
desc: Do all release steps
prompt: Create new release v{{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
preconditions:
- sh: test "{{.BRANCH}}" == "main"
cmds:
- task: release:file
- task: release:tag
- git push
- git push --tags
- goreleaser release
- task: release:goreleaser
snapshot:
desc: Create a local snapshot release
cmds:
- goreleaser release --clean --snapshot