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: before:
hooks: hooks:
- rm -fr ./dist
- go mod tidy - go mod tidy
builds: builds:

View file

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