Files
lnk/.goreleaser.yml

142 lines
3.3 KiB
YAML

# GoReleaser configuration for lnk
version: 2
project_name: lnk
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
# Optional: exclude specific combinations
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.buildTime={{.Date}}
main: ./main.go
binary: lnk
archives:
- id: default
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- README.md
- LICENSE
builds_info:
group: root
owner: root
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
use: github
filters:
exclude:
- '^docs:'
- '^test:'
- '^ci:'
- '^chore:'
- '^style:'
- '^refactor:'
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Others
order: 999
# GitHub release configuration
release:
github:
owner: yarlson
name: lnk
draft: false
prerelease: auto
mode: replace
header: |
## Lnk {{.Tag}}
Git-native dotfiles management that doesn't suck.
### Installation
```bash
# Quick install
curl -sSL https://raw.githubusercontent.com/yarlson/lnk/main/install.sh | bash
# Homebrew
brew tap yarlson/lnk
brew install lnk
# Manual download
# Download the appropriate archive for your platform from the assets below
# Extract and move to your PATH:
# tar -xzf lnk_*.tar.gz && sudo mv lnk /usr/local/bin/
```
footer: |
---
**Full Changelog**: https://github.com/yarlson/lnk/compare/{{.PreviousTag}}...{{.Tag}}
# Homebrew tap
brews:
- repository:
owner: yarlson
name: homebrew-lnk
branch: main
token: "{{ .Env.GITHUB_TOKEN }}"
homepage: "https://github.com/yarlson/lnk"
description: "Git-native dotfiles management that doesn't suck"
license: "MIT"
skip_upload: auto
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
test: |
system "#{bin}/lnk --version"
install: |
bin.install "lnk"
# Docker images (optional)
# dockers:
# - image_templates:
# - "yarlson/lnk:latest"
# - "yarlson/lnk:{{ .Tag }}"
# - "yarlson/lnk:v{{ .Major }}"
# dockerfile: Dockerfile
# build_flag_templates:
# - "--label=org.opencontainers.image.created={{.Date}}"
# - "--label=org.opencontainers.image.title={{.ProjectName}}"
# - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"