---
project_name: fireactions

builds:
- id: fireactions
  main: ./cmd/fireactions
  env:
  - CGO_ENABLED=0
  binary: fireactions
  goos:
  - linux
  goarch:
  - amd64
  - arm64
  ldflags:
  - -X github.com/hostinger/fireactions.Version={{ .Version }}
  - -X github.com/hostinger/fireactions.Commit={{ .ShortCommit }}
  - -X github.com/hostinger/fireactions.Date={{ .CommitDate }}

archives:
- id: fireactions
  builds:
  - fireactions
  name_template: fireactions-v{{ .Version }}-{{ .Os }}-{{ .Arch }}
  format: tar.gz

dockers:
- id: fireactions-amd64
  use: buildx
  dockerfile: Dockerfile
  image_templates:
  - ghcr.io/hostinger/fireactions:{{ .Version }}-amd64
  extra_files:
    - "./"
  build_flag_templates:
  - "--pull"
  - "--platform=linux/amd64"
  goarch: amd64
- id: fireactions-arm64
  use: buildx
  dockerfile: Dockerfile
  image_templates:
  - ghcr.io/hostinger/fireactions:{{ .Version }}-arm64
  extra_files:
    - "./"
  build_flag_templates:
  - "--pull"
  - "--platform=linux/arm64"
  goarch: arm64

docker_manifests:
- name_template: ghcr.io/hostinger/fireactions:{{ .Version }}
  image_templates:
  - ghcr.io/hostinger/fireactions:{{ .Version }}-amd64
  - ghcr.io/hostinger/fireactions:{{ .Version }}-arm64
- name_template: ghcr.io/hostinger/fireactions:latest
  image_templates:
  - ghcr.io/hostinger/fireactions:{{ .Version }}-amd64
  - ghcr.io/hostinger/fireactions:{{ .Version }}-arm64

# Changelog is managed by release-please
changelog:
  disable: true

checksum:
  name_template: fireactions-v{{ .Version }}-checksums.txt
