# GoReleaser config — builds cross-platform binaries and release artifacts # for zut. The release workflow runs GoReleaser when a v* tag is pushed. version: 2 project_name: zut # Releases are published on ermite. In CI the runner sets GITHUB_API_URL and # GITHUB_SERVER_URL to an address the job can reach; the public URLs are the # fallback for a local run. The release workflow also runs on the GitHub # mirror, so `zut update` in older builds, which only reads GitHub, still # updates: there GoReleaser keeps its github.com defaults. github_urls: api: '{{ if eq (index .Env "GITHUB_SERVER_URL") "https://github.com" }}https://api.github.com{{ else }}{{ or (index .Env "GITHUB_API_URL") "https://git.bnema.dev/-/github/api" }}{{ end }}/' upload: '{{ if eq (index .Env "GITHUB_SERVER_URL") "https://github.com" }}https://uploads.github.com{{ else }}{{ or (index .Env "GITHUB_API_URL") "https://git.bnema.dev/-/github/api" }}/uploads{{ end }}/' download: '{{ or (index .Env "GITHUB_SERVER_URL") "https://git.bnema.dev" }}/' before: hooks: - go mod tidy builds: - id: zut main: ./cmd/zut binary: zut env: - CGO_ENABLED=0 goos: [linux, darwin, windows] goarch: [amd64, arm64] # Windows/arm64 is shipped by Go but rarely used — skip to keep the # release artifact list tidy. ignore: - goos: windows goarch: arm64 flags: - -trimpath ldflags: - -s -w - -X main.version={{.Version}} - -X main.commit={{.Commit}} - -X main.date={{.Date}} archives: - id: zut # Human-friendly name: zut_0.1.0_darwin_arm64.tar.gz name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" files: - LICENSE - README.md format_overrides: - goos: windows formats: [zip] checksum: name_template: "checksums.txt" algorithm: sha256 snapshot: version_template: "{{ incpatch .Version }}-next" git: # Git's version-aware sort selects semantic versions correctly. tag_sort: -version:refname changelog: sort: asc use: git filters: # Styling-only commits are neither releasable nor useful release notes. exclude: - "^style:" groups: - title: Added regexp: "^feat(\\([^)]+\\))?!?:" order: 0 - title: Fixed regexp: "^fix(\\([^)]+\\))?!?:" order: 1 - title: Changed regexp: "^(perf|refactor|build)(\\([^)]+\\))?!?:" order: 2 - title: Maintenance regexp: "^(chore|ci)(\\([^)]+\\))?!?:" order: 3 - title: Documentation regexp: "^docs(\\([^)]+\\))?!?:" order: 4 - title: Tests regexp: "^test(\\([^)]+\\))?!?:" order: 5 - title: Other changes order: 999 release: github: owner: bnema name: zut draft: false prerelease: auto header: | ## zut {{ .Tag }} Install with: ```bash curl -fsSL https://git.bnema.dev/zut/raw/main/install.sh | bash ``` Or download a binary below, verify it with `checksums.txt`, and add it to your `$PATH`.