version: 2 project_name: vaultik # This repo lives on Gitea, not GitHub. Without this block goreleaser # talks to the GitHub API by default and a `goreleaser release` either # fails outright or publishes somewhere nobody is looking. gitea_urls: api: https://git.eeqj.de/api/v1 download: https://git.eeqj.de before: hooks: - go mod tidy builds: - id: vaultik main: ./cmd/vaultik binary: vaultik env: - CGO_ENABLED=0 goos: - linux - darwin goarch: - amd64 - arm64 ldflags: - -s -w - -X 'sneak.berlin/go/vaultik/internal/globals.Version={{ .Version }}' - -X 'sneak.berlin/go/vaultik/internal/globals.Commit={{ .Commit }}' - -X 'sneak.berlin/go/vaultik/internal/globals.CommitDate={{ slice .CommitDate 0 10 }}' archives: - id: default name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" formats: - tar.gz files: - LICENSE - README.md checksum: name_template: "checksums.txt" algorithm: sha256 # A snapshot is not a release and must not name itself like one. The # previous `{{ incpatch .Version }}-next` derived a plausible-looking # release number from the last tag -- and with no tags in the repo at # all, from goreleaser's fabricated v0.0.0. This produces the same # string script/version produces for an untagged build, so a snapshot # binary and a `make vaultik` binary of the same clean commit agree. snapshot: version_template: "dev-{{ slice .FullCommit 0 12 }}" changelog: sort: asc use: git filters: exclude: - "^docs:" - "^test:" - "^chore:" - "Merge pull request" - "Merge branch" release: draft: true prerelease: auto