version: 2
project_name: atlas-stats-exporter
release:
  github:
    owner: Cyb3r-Jak3
    name: atlas-stats-exporter
  draft: true
  name_template: '{{.Tag}}'
  footer: |-
    ---
    Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
builds:
  - id: atlas-stats-exporter
    goos:
      - linux
      - windows
      - darwin
      - freebsd
      - openbsd
    goarch:
      - amd64
      - arm
      - arm64
      - "386"
      - s390x
      - ppc64le
      - riscv64
      - mips64
      - mips64le
    goamd64:
      - v1
    go386:
      - sse2
    goarm:
      - "6"
    goarm64:
      - v8.0
    gomips:
      - hardfloat
    goppc64:
      - power8
    goriscv64:
      - rva20u64
    targets:
      - linux_amd64_v1
      - linux_arm_6
      - linux_arm64_v8.0
      - linux_386_sse2
      - linux_s390x
      - linux_ppc64le_power8
      - linux_riscv64_rva20u64
      - linux_mips64_hardfloat
      - linux_mips64le_hardfloat
      - windows_amd64_v1
      - windows_arm64_v8.0
      - windows_386_sse2
      - darwin_amd64_v1
      - darwin_arm64_v8.0
      - freebsd_amd64_v1
      - freebsd_arm_6
      - freebsd_arm64_v8.0
      - freebsd_386_sse2
      - openbsd_amd64_v1
      - openbsd_arm_6
      - openbsd_arm64_v8.0
      - openbsd_386_sse2
      - openbsd_riscv64_rva20u64
    ignore:
      - goos: windows
        goarch: arm
    dir: .
    main: .
    binary: atlas-stats-exporter
    builder: go
    mod_timestamp: '{{ .CommitTimestamp }}'
    tool: go
    command: build
    ldflags:
      - -s -w
      - -X 'github.com/Cyb3r-Jak3/atlas-stats-exporter/pkg/version.Version={{.Version}}'
      - -X 'github.com/Cyb3r-Jak3/atlas-stats-exporter/pkg/version.Commit={{.Commit}}'
      - -X 'github.com/Cyb3r-Jak3/atlas-stats-exporter/pkg/version.Date={{.Date}}'
      - -extldflags "-static"
    flags:
      - -trimpath
    env:
      - CGO_ENABLED=0
archives:
  - id: default
    builds_info:
      mode: 493
    name_template: '{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
    formats:
      - tar.xz
    format_overrides:
      - goos: windows
        formats:
          - zip
    files:
      - src: README.md
  - id: binary
    builds_info:
      mode: 493
    name_template: '{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
    formats:
      - binary
    files:
      - src: license*
      - src: LICENSE*
      - src: readme*
      - src: README*
      - src: changelog*
      - src: CHANGELOG*
nfpms:
  - file_name_template: '{{ .PackageName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
    package_name: atlas-stats-exporter
    provides:
      - atlas-stats-exporter
    contents:
      - src: LICENSE
        dst: /usr/share/licenses/{{ .ProjectName }}/LICENSE.md
      - src: README.md
        dst: /usr/share/doc/{{ .ProjectName }}/README.md
    id: default
    formats:
      - apk
      - deb
      - rpm
    section: default
    priority: extra
    vendor: Cyb3rJak3
    homepage: https://github.com/Cyb3r-Jak3/atlas-stats-exporter/
    maintainer: Cyb3rJak3 <git@cyberjake.xyz>
    description: Atlas Stats Exporter is a tool for exporting Atlas stats to various backends, including Prometheus. It is designed to be run as a service and can be configured via a configuration file or environment variables.
    license: Apache-2.0
    bindir: /usr/bin
    libdirs:
      header: /usr/include
      carchive: /usr/lib
      cshared: /usr/lib
srpm:
  nfpmrpm: {}
  package_name: atlas-stats-exporter
  file_name_template: '{{ .PackageName }}-{{ .Version }}.src.rpm'
  bins:
    atlas-stats-exporter: '%{goipath}'
snapshot:
  version_template: '{{ .Version }}-snapshot-{{ .ShortCommit }}'
checksum:
  name_template: checksums.txt
  algorithm: sha256
dockers_v2:
  - id: atlas-stats-exporter
    dockerfile: Dockerfile
    images:
      - cyb3rjak3/atlas-exporter
      - ghcr.io/cyb3r-jak3/atlas-exporter
    tags:
      - v{{ .Version }}
      - latest
      - v{{ .Major }}
      - '{{ .Tag }}'
    labels:
      org.opencontainers.image.created: '{{.Date}}'
      org.opencontainers.image.description: Atlas Stats Exporter is a prometheus exporter for RIPE Atlas
      org.opencontainers.image.licenses: Apache-2.0
      org.opencontainers.image.name: '{{.ProjectName}}'
      org.opencontainers.image.revision: '{{.FullCommit}}'
      org.opencontainers.image.source: '{{.GitURL}}'
      org.opencontainers.image.vendor: Cyb3rJak3
      org.opencontainers.image.version: '{{.Version}}'
    platforms:
      - linux/amd64
      - linux/arm64
    sbom: "true"
    retry:
      attempts: 10
      delay: 10s
      max_delay: 5m0s
docker_digest:
  name_template: digests.txt
blobs:
  - bucket: public-files
    provider: s3
    region: auto
    directory: '{{ .ProjectName }}/{{ .Tag }}'
    endpoint: https://8be772befd147a8df540aae0fa15c047.r2.cloudflarestorage.com
    content_disposition: attachment;filename={{.Filename}}
changelog:
  filters:
    exclude:
      - '^docs:'
      - '^test:'
      - '^chore:'
  sort: asc
  format: '{{ .SHA }} {{ .Message }}'
dist: dist
signs:
  - id: default
    cmd: gpg
    args:
      - --batch
      - --local-user
      - '{{ .Env.GPG_FINGERPRINT }}'
      - --output
      - ${signature}
      - --detach-sign
      - ${artifact}
    signature: ${artifact}.sig
    artifacts: all
env_files:
  github_token: ~/.config/goreleaser/github_token
  gitlab_token: ~/.config/goreleaser/gitlab_token
  gitea_token: ~/.config/goreleaser/gitea_token
source:
  name_template: '{{ .ProjectName }}-{{ .Version }}'
  format: tar.gz
gomod:
  gobinary: go
announce:
  twitter:
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
  mastodon:
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
    server: ""
  reddit:
    title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
    url_template: '{{ .ReleaseURL }}'
  slack:
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
    username: GoReleaser
  discord:
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
    author: GoReleaser
    color: "3888754"
    icon_url: https://goreleaser.com/static/avatar.png
  teams:
    title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
    color: '#2D313E'
    icon_url: https://goreleaser.com/static/avatar.png
  smtp:
    subject_template: '{{ .ProjectName }} {{ .Tag }} is out!'
    body_template: 'You can view details from: {{ .ReleaseURL }}'
  mattermost:
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
    title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
    color: '#2D313E'
    username: GoReleaser
  linkedin:
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
  telegram:
    message_template: '{{ print .ProjectName " " .Tag " is out! Check it out at " .ReleaseURL | mdv2escape }}'
    parse_mode: MarkdownV2
  webhook:
    message_template: '{ "message": "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"}'
    content_type: application/json; charset=utf-8
    expected_status_codes:
      - 200
      - 201
      - 202
      - 204
  opencollective:
    title_template: '{{ .Tag }}'
    message_template: '{{ .ProjectName }} {{ .Tag }} is out!<br/>Check it out at <a href="{{ .ReleaseURL }}">{{ .ReleaseURL }}</a>'
  bluesky:
    enabled: "true"
    username: releases.cyberjake.xyz
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
  discourse:
    title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
    message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
    username: system
sboms:
  - id: default
    cmd: syft
    env:
      - SYFT_FILE_METADATA_CATALOGER_ENABLED=true
    args:
      - $artifact
      - --output
      - spdx-json=$document
      - --enrich
      - all
    documents:
      - '{{ .ArtifactName }}.sbom.json'
    artifacts: archive
git:
  tag_sort: -version:refname
mcp:
  name: ""
  title: ""
  auth:
    type: none
retry:
  attempts: 10
  delay: 10s
  max_delay: 5m0s
github_urls:
  download: https://github.com
gitlab_urls:
  download: https://gitlab.com
