65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
|
#
|
|
# See https://goreleaser.com/customization/ for more information.
|
|
version: 2
|
|
project_name: goose
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
builds:
|
|
- env:
|
|
- CGO_ENABLED=0
|
|
binary: goose
|
|
main: ./cmd/goose
|
|
goos:
|
|
- linux
|
|
- windows
|
|
- darwin
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
ldflags:
|
|
# The v prefix is stripped by goreleaser, so we need to add it back.
|
|
# https://goreleaser.com/customization/templates/#fnref:version-prefix
|
|
- "-s -w -X main.version=v{{ .Version }}"
|
|
|
|
archives:
|
|
- formats:
|
|
- binary
|
|
name_template: >-
|
|
{{ .ProjectName }}_{{- tolower .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
|
|
checksum:
|
|
name_template: "checksums.txt"
|
|
snapshot:
|
|
version_template: "{{ incpatch .Version }}-next"
|
|
changelog:
|
|
use: github-native
|
|
dockers_v2:
|
|
- images:
|
|
- ghcr.io/pressly/goose
|
|
dockerfile: goreleaser.Dockerfile
|
|
platforms:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
# Prereleases only get the exact tag, for example v3.30.0-rc1.
|
|
tags:
|
|
- "{{ .Tag }}"
|
|
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}{{ end }}"
|
|
- "{{ if not .Prerelease }}v{{ .Major }}{{ end }}"
|
|
- "{{ if not .Prerelease }}latest{{ end }}"
|
|
labels:
|
|
org.opencontainers.image.title: goose
|
|
org.opencontainers.image.description: "Database migration tool"
|
|
org.opencontainers.image.source: https://github.com/pressly/goose
|
|
org.opencontainers.image.url: https://pressly.github.io/goose
|
|
org.opencontainers.image.licenses: MIT
|
|
org.opencontainers.image.version: "{{ .Tag }}"
|
|
org.opencontainers.image.revision: "{{ .FullCommit }}"
|
|
org.opencontainers.image.created: "{{ .Date }}"
|
|
# GHCR reads these from the image index of a multi-platform image.
|
|
annotations:
|
|
org.opencontainers.image.description: "Database migration tool"
|
|
org.opencontainers.image.source: https://github.com/pressly/goose
|
|
org.opencontainers.image.licenses: MIT
|