version: 2

release:
  draft: false
  prerelease: true

before:
  hooks:
    - go mod download

builds:
  - <<: &build_defaults
      main: ./cmd/actionlint
      ldflags: -s -w -X github.com/rhysd/actionlint.version={{.Version}} -X "github.com/rhysd/actionlint.installedFrom=installed by downloading from release page"
      env:
        - CGO_ENABLED=0
    id: macos
    goos: [darwin]
    goarch: [amd64, arm64]

  - <<: *build_defaults
    id: linux
    goos: [linux]
    goarch: [386, arm, amd64, arm64]

  - <<: *build_defaults
    id: windows
    goos: [windows]
    goarch: [386, amd64, arm64]

  - <<: *build_defaults
    id: freebsd
    goos: [freebsd]
    goarch: [386, amd64]

checksum:
  name_template: "actionlint_{{.Version}}_checksums.txt"
  algorithm: sha256

archives:
  - <<: &archives_defaults
      files:
        - README.md
        - LICENSE.txt
        - docs
        - man/actionlint.1
    id: nix
    ids: [macos, linux, freebsd]
    formats: [tar.gz]
  - <<: *archives_defaults
    id: windows
    ids: [windows]
    formats: [zip]

homebrew_casks:
  - name: actionlint
    directory: Casks
    binaries: [actionlint]
    manpages: [man/actionlint.1]
    homepage: https://github.com/rhysd/actionlint#readme
    description: Static checker for GitHub Actions workflow files
    dependencies:
      - formula: shellcheck
    repository:
      owner: rhysd
      name: actionlint
    commit_author:
      name: 'github-actions[bot]'
      email: '41898282+github-actions[bot]@users.noreply.github.com'

changelog:
  disable: true
