github.com/windmeup/goreleaser@v1.21.95/.goreleaser.yaml (about)

     1  # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
     2  # vim: set ts=2 sw=2 tw=0 fo=jcroql
     3  version: 1
     4  
     5  env:
     6    - GO111MODULE=on
     7  
     8  before:
     9    hooks:
    10      - go mod tidy
    11      - ./scripts/completions.sh
    12      - ./scripts/manpages.sh
    13  
    14  snapshot:
    15    name_template: "{{ incpatch .Version }}-next"
    16  
    17  gomod:
    18    proxy: true
    19  
    20  report_sizes: true
    21  
    22  git:
    23    ignore_tags:
    24      - "{{ if not .IsNightly }}nightly{{ end }}"
    25  
    26  metadata:
    27    mod_timestamp: "{{ .CommitTimestamp }}"
    28  
    29  builds:
    30    - env:
    31        - CGO_ENABLED=0
    32      goos:
    33        - linux
    34        - darwin
    35        - windows
    36      goarch:
    37        - "386"
    38        - amd64
    39        - arm
    40        - arm64
    41        - ppc64
    42      goarm:
    43        - "7"
    44      ignore:
    45        - goos: windows
    46          goarch: arm
    47      mod_timestamp: "{{ .CommitTimestamp }}"
    48      flags:
    49        - -trimpath
    50      ldflags:
    51        - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser -X main.treeState={{ .IsGitDirty }}
    52  
    53  universal_binaries:
    54    - replace: false
    55  
    56  # temporarely disables until we add better filters for platforms et al, and test more.
    57  # upx:
    58  #   - enabled: true
    59  
    60  checksum:
    61    name_template: "checksums.txt"
    62  
    63  changelog:
    64    sort: asc
    65    use: github
    66    filters:
    67      exclude:
    68        - "^test:"
    69        - "^chore"
    70        - "merge conflict"
    71        - Merge pull request
    72        - Merge remote-tracking branch
    73        - Merge branch
    74        - go mod tidy
    75    groups:
    76      - title: Dependency updates
    77        regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
    78        order: 300
    79      - title: "New Features"
    80        regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
    81        order: 100
    82      - title: "Security updates"
    83        regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
    84        order: 150
    85      - title: "Bug fixes"
    86        regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
    87        order: 200
    88      - title: "Documentation updates"
    89        regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
    90        order: 400
    91      - title: "Build process updates"
    92        regexp: ^.*?build(\([[:word:]]+\))??!?:.+$
    93        order: 400
    94      - title: Other work
    95        order: 9999
    96  
    97  dockers:
    98    - image_templates:
    99        - "goreleaser/goreleaser:v{{ .Version }}-amd64"
   100        - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-amd64"
   101      dockerfile: Dockerfile
   102      use: buildx
   103      build_flag_templates:
   104        - "--pull"
   105        - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md"
   106        - "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png"
   107        - '--label=io.artifacthub.package.maintainers=[{"name":"Carlos Alexandro Becker","email":"carlos@carlosbecker.dev"}]'
   108        - "--label=io.artifacthub.package.license=MIT"
   109        - "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible"
   110        - "--label=org.opencontainers.image.created={{.Date}}"
   111        - "--label=org.opencontainers.image.name={{.ProjectName}}"
   112        - "--label=org.opencontainers.image.revision={{.FullCommit}}"
   113        - "--label=org.opencontainers.image.version={{.Version}}"
   114        - "--label=org.opencontainers.image.source={{.GitURL}}"
   115        - "--platform=linux/amd64"
   116      extra_files:
   117        - scripts/entrypoint.sh
   118    - image_templates:
   119        - "goreleaser/goreleaser:v{{ .Version }}-arm64"
   120        - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-arm64"
   121      dockerfile: Dockerfile
   122      use: buildx
   123      build_flag_templates:
   124        - "--pull"
   125        - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md"
   126        - "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png"
   127        - '--label=io.artifacthub.package.maintainers=[{"name":"Carlos Alexandro Becker","email":"carlos@carlosbecker.dev"}]'
   128        - "--label=io.artifacthub.package.license=MIT"
   129        - "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible"
   130        - "--label=org.opencontainers.image.created={{.Date}}"
   131        - "--label=org.opencontainers.image.name={{.ProjectName}}"
   132        - "--label=org.opencontainers.image.revision={{.FullCommit}}"
   133        - "--label=org.opencontainers.image.version={{.Version}}"
   134        - "--label=org.opencontainers.image.source={{.GitURL}}"
   135        - "--platform=linux/arm64"
   136      goarch: arm64
   137      extra_files:
   138        - scripts/entrypoint.sh
   139  
   140  docker_manifests:
   141    - name_template: "goreleaser/goreleaser:v{{ .Version }}"
   142      image_templates:
   143        - "goreleaser/goreleaser:v{{ .Version }}-amd64"
   144        - "goreleaser/goreleaser:v{{ .Version }}-arm64"
   145    - name_template: "ghcr.io/goreleaser/goreleaser:v{{ .Version }}"
   146      image_templates:
   147        - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-amd64"
   148        - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-arm64"
   149    - name_template: "{{ if not .IsNightly }}goreleaser/goreleaser:latest{{ end }}"
   150      image_templates:
   151        - "goreleaser/goreleaser:v{{ .Version }}-amd64"
   152        - "goreleaser/goreleaser:v{{ .Version }}-arm64"
   153    - name_template: "{{ if not .IsNightly }}ghcr.io/goreleaser/goreleaser:latest{{ end }}"
   154      image_templates:
   155        - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-amd64"
   156        - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-arm64"
   157  
   158  archives:
   159    - name_template: >-
   160        {{- .ProjectName }}_
   161        {{- title .Os }}_
   162        {{- if eq .Arch "amd64" }}x86_64
   163        {{- else if eq .Arch "386" }}i386
   164        {{- else }}{{ .Arch }}{{ end }}
   165        {{- if .Arm }}v{{ .Arm }}{{ end -}}
   166      format_overrides:
   167        - goos: windows
   168          format: zip
   169      builds_info:
   170        group: root
   171        owner: root
   172      files:
   173        - README.md
   174        - LICENSE.md
   175        - completions/*
   176        - manpages/*
   177  
   178  brews:
   179    - repository:
   180        owner: goreleaser
   181        name: homebrew-tap
   182      folder: Formula
   183      goarm: "7"
   184      homepage: https://goreleaser.com
   185      description: Deliver Go binaries as fast and easily as possible
   186      license: MIT
   187      test: |
   188        system "#{bin}/goreleaser -v"
   189      dependencies:
   190        - name: go
   191          type: optional
   192        - name: git
   193      conflicts:
   194        - goreleaser-pro
   195      extra_install: |-
   196        bash_completion.install "completions/goreleaser.bash" => "goreleaser"
   197        zsh_completion.install "completions/goreleaser.zsh" => "_goreleaser"
   198        fish_completion.install "completions/goreleaser.fish"
   199        man1.install "manpages/goreleaser.1.gz"
   200  
   201  nix:
   202    - name: goreleaser
   203      repository:
   204        owner: goreleaser
   205        name: nur
   206      homepage: https://goreleaser.com
   207      description: Deliver Go binaries as fast and easily as possible
   208      path: pkgs/goreleaser/default.nix
   209      license: mit
   210      extra_install: |-
   211        installManPage ./manpages/goreleaser.1.gz
   212        installShellCompletion ./completions/*
   213  
   214  winget:
   215    - name: goreleaser
   216      publisher: goreleaser
   217      license: MIT
   218      homepage: https://goreleaser.com
   219      short_description: Deliver Go binaries as fast and easily as possible
   220      repository:
   221        owner: goreleaser
   222        name: winget-pkgs
   223        branch: "goreleaser-{{.Version}}"
   224        pull_request:
   225          enabled: true
   226          draft: true
   227          base:
   228            owner: microsoft
   229            name: winget-pkgs
   230            branch: master
   231  
   232  aurs:
   233    - homepage: https://goreleaser.com
   234      description: Deliver Go binaries as fast and easily as possible
   235      maintainers:
   236        - "Fernandez Ludovic <lfernandez dot dev at gmail dot com>"
   237        - "Carlos Alexandro Becker <carlos at becker dot software>"
   238      license: MIT
   239      private_key: "{{ .Env.AUR_KEY }}"
   240      git_url: "ssh://aur@aur.archlinux.org/goreleaser-bin.git"
   241      package: |-
   242        # bin
   243        install -Dm755 "./goreleaser" "${pkgdir}/usr/bin/goreleaser"
   244  
   245        # license
   246        install -Dm644 "./LICENSE.md" "${pkgdir}/usr/share/licenses/goreleaser/LICENSE"
   247  
   248        # completions
   249        mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
   250        mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
   251        mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
   252        install -Dm644 "./completions/goreleaser.bash" "${pkgdir}/usr/share/bash-completion/completions/goreleaser"
   253        install -Dm644 "./completions/goreleaser.zsh" "${pkgdir}/usr/share/zsh/site-functions/_goreleaser"
   254        install -Dm644 "./completions/goreleaser.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/goreleaser.fish"
   255  
   256        # man pages
   257        install -Dm644 "./manpages/goreleaser.1.gz" "${pkgdir}/usr/share/man/man1/goreleaser.1.gz"
   258  
   259  scoops:
   260    - repository:
   261        owner: goreleaser
   262        name: scoop-bucket
   263      folder: bucket
   264      homepage: https://goreleaser.com
   265      description: Deliver Go binaries as fast and easily as possible
   266      license: MIT
   267  
   268  nfpms:
   269    - file_name_template: "{{ .ConventionalFileName }}"
   270      id: packages
   271      homepage: https://goreleaser.com
   272      description: |-
   273        Deliver Go binaries as fast and easily as possible.
   274        GoReleaser allows you to release easily build, package, publish and
   275        announce to several places at one go.
   276      maintainer: Carlos Alexandro Becker <carlos@becker.software>
   277      license: MIT
   278      vendor: GoReleaser
   279      bindir: /usr/bin
   280      section: utils
   281      contents:
   282        - src: ./completions/goreleaser.bash
   283          dst: /usr/share/bash-completion/completions/goreleaser
   284          file_info:
   285            mode: 0644
   286        - src: ./completions/goreleaser.fish
   287          dst: /usr/share/fish/vendor_completions.d/goreleaser.fish
   288          file_info:
   289            mode: 0644
   290        - src: ./completions/goreleaser.zsh
   291          dst: /usr/share/zsh/vendor-completions/_goreleaser
   292          file_info:
   293            mode: 0644
   294        - src: ./manpages/goreleaser.1.gz
   295          dst: /usr/share/man/man1/goreleaser.1.gz
   296          file_info:
   297            mode: 0644
   298        - src: ./LICENSE.md
   299          dst: /usr/share/doc/goreleaser/copyright
   300          file_info:
   301            mode: 0644
   302      formats:
   303        - apk
   304        - deb
   305        - rpm
   306        - archlinux
   307      dependencies:
   308        - git
   309      recommends:
   310        - golang
   311      deb:
   312        lintian_overrides:
   313          - statically-linked-binary
   314          - changelog-file-missing-in-native-package
   315  
   316  snapcrafts:
   317    - name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
   318      summary: Deliver Go binaries as fast and easily as possible
   319      description: |
   320        GoReleaser builds Go binaries for several platforms, creates a GitHub
   321        release and then pushes a Homebrew formula to a repository. All that
   322        wrapped in your favorite CI.
   323      grade: stable
   324      confinement: classic
   325      publish: true
   326      disable: "{{ if .IsNightly }}true{{ end }}"
   327  
   328  sboms:
   329    - artifacts: archive
   330  
   331  signs:
   332    - cmd: cosign
   333      certificate: "${artifact}.pem"
   334      output: true
   335      artifacts: checksum
   336      args:
   337        - sign-blob
   338        - "--output-certificate=${certificate}"
   339        - "--output-signature=${signature}"
   340        - "${artifact}"
   341        - --yes
   342  
   343  docker_signs:
   344    - cmd: cosign
   345      artifacts: manifests
   346      output: true
   347      args:
   348        - "sign"
   349        - "${artifact}@${digest}"
   350        - --yes
   351  
   352  publishers:
   353    - name: fury.io
   354      ids:
   355        - packages
   356      env:
   357        - "FURY_TOKEN={{ .Env.FURY_TOKEN }}"
   358      cmd: ./scripts/fury-upload.sh {{ .ArtifactName }}
   359      disable: "{{ if .IsNightly }}true{{ end }}"
   360  
   361  milestones:
   362    - close: true
   363  
   364  release:
   365    name_template: "v{{ .Version }}"
   366    footer: |
   367      **Full Changelog**: https://github.com/goreleaser/goreleaser/compare/{{ .PreviousTag }}...{{ .Tag }}
   368  
   369      ## Helping out
   370  
   371      This release is only possible thanks to **all** the support of some **awesome people**!
   372  
   373      Want to be one of them?
   374      You can [sponsor](https://goreleaser.com/sponsors/), get a [Pro License](https://goreleaser.com/pro) or [contribute with code](https://goreleaser.com/contributing).
   375  
   376      ## Where to go next?
   377  
   378      * Find examples and commented usage of all options in our [website](https://goreleaser.com/intro/).
   379      * Reach out on [Discord](https://discord.gg/RGEBtg8vQ6) and [Twitter](https://twitter.com/goreleaser)!
   380  
   381      <a href="https://goreleaser.com"><img src="https://raw.githubusercontent.com/goreleaser/artwork/master/opencollective-header.png" with="100%" alt="GoReleaser logo"></a>
   382  
   383  announce:
   384    twitter:
   385      enabled: false
   386      message_template: "GoReleaser {{ .Tag }} is out! Check it out: https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}"
   387  
   388    mastodon:
   389      enabled: true
   390      message_template: "#GoReleaser {{ .Tag }} is out! Check it out: https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}"
   391      server: https://fosstodon.org
   392  
   393    discord:
   394      enabled: true
   395      message_template: "GoReleaser {{ .Tag }} is out! Check it out: https://github.com/goreleaser/goreleaser/releases/tag/{{ .Tag }}"