798f2ab3c3
Release / release (push) Waiting to run
Two polish issues surfaced by the v0.3.1-rc1 pipeline test: - The release was tagged v0.3.1-rc1 but published without the prerelease flag, so it appeared alongside stable releases. Add 'prerelease: auto' to release.github so GoReleaser marks any tag with a semver prerelease suffix (-rc, -beta, -alpha, -pre) appropriately. - The changelog filters used '^docs:' patterns that only match bare conventional commits. Scoped variants like 'docs(readme):' and 'chore(make):' slipped through into the published changelog. Switch to '^docs[:(]' style patterns to match both forms, and add '^style[:(]' so gofmt-drift commits are excluded too.
107 lines
3.5 KiB
YAML
107 lines
3.5 KiB
YAML
version: 2
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
|
|
builds:
|
|
- main: ./cmd/gnoma
|
|
binary: gnoma
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
- windows
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
ldflags:
|
|
- -s -w
|
|
- -X main.buildVersion={{.Version}}
|
|
- -X main.buildCommit={{.ShortCommit}}
|
|
- -X main.buildDate={{.Date}}
|
|
|
|
archives:
|
|
- formats: [tar.gz]
|
|
format_overrides:
|
|
- goos: windows
|
|
formats: [zip]
|
|
name_template: >-
|
|
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
|
|
|
|
checksum:
|
|
name_template: checksums.txt
|
|
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
# Match both bare and scoped conventional commits, e.g. both
|
|
# "docs:" and "docs(readme):" should be excluded.
|
|
- "^docs[:(]"
|
|
- "^test[:(]"
|
|
- "^chore[:(]"
|
|
- "^style[:(]"
|
|
|
|
# Multi-arch Docker images published to GitHub Container Registry.
|
|
# Build host needs Docker buildx and a `docker login ghcr.io` for the
|
|
# org/user that owns ghcr.io/vikingowl91 (use a PAT with `write:packages`).
|
|
dockers:
|
|
- image_templates:
|
|
- "ghcr.io/vikingowl91/gnoma:{{ .Version }}-amd64"
|
|
- "ghcr.io/vikingowl91/gnoma:latest-amd64"
|
|
use: buildx
|
|
dockerfile: Dockerfile
|
|
goos: linux
|
|
goarch: amd64
|
|
build_flag_templates:
|
|
- "--platform=linux/amd64"
|
|
- "--label=org.opencontainers.image.title=gnoma"
|
|
# image.source points at the GitHub mirror so GHCR auto-links the
|
|
# package page to the repo (Readme, contributors, discussions).
|
|
# The Gitea canonical URL stays available via image.url.
|
|
- "--label=org.opencontainers.image.source=https://github.com/VikingOwl91/gnoma"
|
|
- "--label=org.opencontainers.image.url=https://somegit.dev/Owlibou/gnoma"
|
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
|
- "--label=org.opencontainers.image.licenses=Apache-2.0"
|
|
- image_templates:
|
|
- "ghcr.io/vikingowl91/gnoma:{{ .Version }}-arm64"
|
|
- "ghcr.io/vikingowl91/gnoma:latest-arm64"
|
|
use: buildx
|
|
dockerfile: Dockerfile
|
|
goos: linux
|
|
goarch: arm64
|
|
build_flag_templates:
|
|
- "--platform=linux/arm64"
|
|
- "--label=org.opencontainers.image.title=gnoma"
|
|
# image.source points at the GitHub mirror so GHCR auto-links the
|
|
# package page to the repo (Readme, contributors, discussions).
|
|
# The Gitea canonical URL stays available via image.url.
|
|
- "--label=org.opencontainers.image.source=https://github.com/VikingOwl91/gnoma"
|
|
- "--label=org.opencontainers.image.url=https://somegit.dev/Owlibou/gnoma"
|
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
|
- "--label=org.opencontainers.image.licenses=Apache-2.0"
|
|
|
|
docker_manifests:
|
|
- name_template: "ghcr.io/vikingowl91/gnoma:{{ .Version }}"
|
|
image_templates:
|
|
- "ghcr.io/vikingowl91/gnoma:{{ .Version }}-amd64"
|
|
- "ghcr.io/vikingowl91/gnoma:{{ .Version }}-arm64"
|
|
- name_template: "ghcr.io/vikingowl91/gnoma:latest"
|
|
image_templates:
|
|
- "ghcr.io/vikingowl91/gnoma:latest-amd64"
|
|
- "ghcr.io/vikingowl91/gnoma:latest-arm64"
|
|
|
|
release:
|
|
github:
|
|
owner: VikingOwl91
|
|
name: gnoma
|
|
# Auto-detect prereleases from semver: tags with -rc, -beta, -alpha,
|
|
# -pre, etc. suffix get marked as prerelease on GitHub.
|
|
prerelease: auto
|