version: 2
project_name: cloudflare-utils
release:
  github:
    owner: Cyb3r-Jak3
    name: cloudflare-utils
  draft: true
  name_template: '{{.Tag}}'
homebrew_casks:
  - name: cloudflare-utils
    repository:
      owner: Cyb3r-Jak3
      name: homebrew-tap
      token: '{{ .Env.GITHUB_TOKEN }}'
    commit_author:
      name: goreleaserbot
      email: bot@goreleaser.com
    commit_msg_template: Brew cask update for {{ .ProjectName }} version {{ .Tag }}
    directory: Casks
    description: |
      Community created utilities for Cloudflare such as:

      - Deleting all records in a zone
      - Deleting all records in a zone except for a list of records
      - Deleting all Pages deployments for a branch
      - Deleting all Pages deployments for project
      - Deleting all Pages deployments before or after a time

      Cloudflare and the Cloudflare logo are trademarks and/or registered trademarks of Cloudflare, Inc.
    homepage: https://cloudflare-utils.cyberjake.xyz/
    ids:
      - default
    binaries:
      - cloudflare-utils
    url:
      verified: github.com/Cyb3r-Jak3/cloudflare-utils
    completions:
      bash: ./completions/{{ .ProjectName }}.bash
      zsh: ./completions/{{ .ProjectName }}.zsh
      fish: ./completions/{{ .ProjectName }}.fish
    license: Apache-2.0
builds:
  - id: default
    goos:
      - linux
      - windows
      - darwin
      - freebsd
    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
    ignore:
      - goos: windows
        goarch: arm
    dir: .
    main: .
    binary: cloudflare-utils
    builder: go
    mod_timestamp: '{{ .CommitTimestamp }}'
    tool: go
    command: build
    ldflags:
      - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}}
      - -extldflags "-static"
    flags:
      - -trimpath
    env:
      - CGO_ENABLED=0
archives:
  - id: legacy
    builds_info:
      mode: 493
    name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
    formats:
      - tar.xz
    format_overrides:
      - goos: windows
        formats:
          - zip
    files:
      - src: README.md
        info:
          mtime: '{{ .CommitDate }}'
      - src: LICENSE
        info:
          mtime: '{{ .CommitDate }}'
      - src: completions/*
        info:
          mtime: '{{ .CommitDate }}'
  - 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
        info:
          mtime: '{{ .CommitDate }}'
      - src: LICENSE
        info:
          mtime: '{{ .CommitDate }}'
      - src: completions/*
        info:
          mtime: '{{ .CommitDate }}'
  - 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: cloudflare-utils
    provides:
      - cloudflare-utils
    contents:
      - src: LICENSE
        dst: /usr/share/licenses/{{ .ProjectName }}/LICENSE.md
        file_info:
          mode: 420
          mtime: '{{ .CommitDate }}'
      - src: README.md
        dst: /usr/share/doc/{{ .ProjectName }}/README.md
        file_info:
          mode: 420
          mtime: '{{ .CommitDate }}'
      - src: ./completions/{{ .ProjectName }}.bash
        dst: /usr/share/bash-completion/completions/{{ .ProjectName }}
        file_info:
          mode: 420
          mtime: '{{ .CommitDate }}'
      - src: ./completions/{{ .ProjectName }}.fish
        dst: /usr/share/fish/vendor_completions.d/{{ .ProjectName }}.fish
        file_info:
          mode: 420
          mtime: '{{ .CommitDate }}'
      - src: ./completions/{{ .ProjectName }}.zsh
        dst: /usr/share/zsh/vendor-completions/_{{ .ProjectName }}
        file_info:
          mode: 420
          mtime: '{{ .CommitDate }}'
    id: default
    ids:
      - default
    formats:
      - apk
      - deb
      - rpm
    section: default
    priority: extra
    vendor: Cyb3rJak3
    homepage: https://cloudflare-utils.cyberjake.xyz/
    maintainer: Cyb3rJak3 <git@cyberjake.xyz>
    description: |
      Community created utilities for Cloudflare such as:

      - Deleting all records in a zone
      - Deleting all records in a zone except for a list of records
      - Deleting all Pages deployments for a branch
      - Deleting all Pages deployments for project
      - Deleting all Pages deployments before or after a time

      Cloudflare and the Cloudflare logo are trademarks and/or registered trademarks of Cloudflare, Inc.
    license: Apache-2.0
    bindir: /usr/bin
    libdirs:
      header: /usr/include
      carchive: /usr/lib
      cshared: /usr/lib
srpm:
  nfpmrpm: {}
  package_name: cloudflare-utils
  file_name_template: '{{ .PackageName }}-{{ .Version }}.src.rpm'
  bins:
    cloudflare-utils: '%{goipath}'
snapshot:
  version_template: '{{ .Version }}-snapshot-{{ .ShortCommit }}'
checksum:
  name_template: checksums.txt
  algorithm: sha256
docker_digest:
  name_template: digests.txt
blobs:
  - bucket: public-files
    provider: s3
    region: auto
    directory: '{{ .ProjectName }}/{{ .Tag }}'
    ids:
      - default
    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
before:
  hooks:
    - task generate-docs
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
chocolateys:
  - name: cloudflare-utils
    ids:
      - default
    package_source_url: https://github.com/Cyb3r-Jak3/cloudflare-utils
    title: Cloudflare Utils
    authors: Cyb3r-Jak3
    project_url: https://cloudflare-utils.cyberjake.xyz/
    icon_url: https://cloudflare-utils.cyberjake.xyz/assets/images/logo.png
    copyright: 2023-2025 Cyb3r-Jak3
    license_url: https://github.com/Cyb3r-Jak3/cloudflare-utils/blob/main/LICENSE
    docs_url: https://cloudflare-utils.cyberjake.xyz/
    bug_tracker_url: https://github.com/Cyb3r-Jak3/cloudflare-utils/issues
    tags: cloudflare
    summary: Community created utilities for Cloudflare
    description: |
      Community created utilities for Cloudflare such as:

      - Deleting all records in a zone
      - Deleting all records in a zone except for a list of records
      - Deleting all Pages deployments for a branch
      - Deleting all Pages deployments for project
      - Deleting all Pages deployments before or after a time

      Cloudflare and the Cloudflare logo are trademarks and/or registered trademarks of Cloudflare, Inc.
    release_notes: https://github.com/Cyb3r-Jak3/cloudflare-utils/releases/tag/{{ .Tag }}
    api_key: '{{ .Env.CHOCOLATEY_API_KEY }}'
    source_repo: https://push.chocolatey.org/
    goamd64: v1
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
