paperless-gpt/.goreleaser.yaml
2025-02-10 13:08:49 +01:00

97 lines
2.5 KiB
YAML

# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env:
- CGO_ENABLED=1
- CC=gcc
goos:
- linux
goarch:
- amd64
tags:
- musl
flags:
- -tags=musl
ldflags:
- -s -w -extldflags '-static'
- -X main.version={{.Version}}
- -X main.commit={{.Commit}}
- -X main.date={{.Date}}
# Dependencies are managed through Docker
ignore:
- goos: windows
- goos: darwin
# Create .tar.gz and .zip archives
archives:
- format: tar.gz
# 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 }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
files:
- README.md
- LICENSE
- CONTRIBUTING.md
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^chore:'
- Merge pull request
- Merge branch
# Dockers setup - uses our existing Dockerfile
dockers:
- dockerfile: Dockerfile
image_templates:
- "icereed/paperless-gpt:{{ .Version }}"
- "icereed/paperless-gpt:latest"
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--build-arg=VERSION={{.Version}}"
- "--build-arg=COMMIT={{.ShortCommit}}"
- "--build-arg=BUILD_DATE={{.Date}}"
# Homebrew is disabled as we focus on Linux first
# brews:
# - repository:
# owner: icereed
# name: homebrew-tap
# homepage: "https://github.com/icereed/paperless-gpt"
# description: "AI-powered companion application for paperless-ngx"
# license: "MIT"
# dependencies:
# - name: mupdf
# install: |
# bin.install "paperless-gpt"