diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c136f51..00106d7 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,3 +1,5 @@ +version: 2 + before: hooks: - go mod tidy @@ -46,10 +48,7 @@ builds: output: true archives: - - builds: - - linux - - macos - name_template: >- + - name_template: >- {{ .ProjectName }}_v{{ .Version }}_ {{- title .Os }}_ {{- if eq .Arch "amd64" }}x86_64 @@ -65,7 +64,7 @@ checksum: name_template: checksums.txt snapshot: - name_template: "{{ incpatch .Version }}-next" + version_template: "{{ incpatch .Version }}-next" changelog: sort: asc @@ -75,7 +74,7 @@ changelog: - "^test:" # https://goreleaser.com/customization/homebrew/ -brews: +homebrew_casks: - name: tsk homepage: "https://github.com/notnmeyer/tsk" description: "A simple task runner and build tool with TOML configuration." @@ -87,6 +86,3 @@ brews: name: homebrew-tsk token: "{{ .Env.HOMEBREW_TAP_REPO_GITHUB_TOKEN }}" skip_upload: auto - install: |- - bin.install "tsk" - fish_completion.install "completions/tsk.fish" diff --git a/tasks.toml b/tasks.toml index 0ba22f8..005e92d 100644 --- a/tasks.toml +++ b/tasks.toml @@ -1,20 +1,14 @@ [tasks.run] desc = "Run tsk" -cmds = [ - "go run cmd/tsk/tsk.go {{.CLI_ARGS}}" -] +cmds = ["go run cmd/tsk/tsk.go {{.CLI_ARGS}}"] [tasks.build] desc = "Build the project" -cmds = [ - "go build -o bin/tsk -v cmd/tsk/tsk.go" -] +cmds = ["go build -o bin/tsk -v cmd/tsk/tsk.go"] [tasks.clean] desc = "Remove build artifacts" -cmds = [ - "rm -rf ./dist/*" -] +cmds = ["rm -rf ./dist/*"] [tasks.release] desc = "Trigger a release" @@ -23,17 +17,12 @@ Create and push a new tag to GitHub, triggering a new release from CI. usage: `tsk release -- v0.0.0` ''' -cmds = [ - "git tag {{.CLI_ARGS}}", - "git push origin {{.CLI_ARGS}}", -] +cmds = ["git tag {{.CLI_ARGS}}", "git push origin {{.CLI_ARGS}}"] -[tasks.release_dry] +[tasks."release:dry"] desc = "goreleaser dry run" dotenv = ".env" -cmds = [ - "goreleaser release --clean --skip-publish --skip-validate" -] +cmds = ["goreleaser release --snapshot --clean --skip=publish"] [tasks.test] desc = "Run tests" @@ -55,13 +44,8 @@ usage: version=0.8.1 platform=Darwin arch=arm64 tsk install_release [tasks.sign] desc = "Sign binaries" dotenv = ".env" -cmds = [ - "gon gon-arm64.hcl", - "gon gon-amd64.hcl", -] +cmds = ["gon gon-arm64.hcl", "gon gon-amd64.hcl"] [tasks.install_completions] desc = "Install shell completions" -cmds = [ - "cp completions/tsk.fish ~/.config/fish/completions/" -] +cmds = ["cp completions/tsk.fish ~/.config/fish/completions/"]