Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

before:
hooks:
- go mod tidy
Expand Down Expand Up @@ -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
Expand All @@ -65,7 +64,7 @@ checksum:
name_template: checksums.txt

snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
Expand All @@ -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."
Expand All @@ -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"
32 changes: 8 additions & 24 deletions tasks.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand All @@ -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/"]