GoReleaser builds Go binaries as fast and easily as possible

Overview

GoReleaser Logo

GoReleaser

Deliver Go binaries as fast and easily as possible.


GoReleaser builds Go binaries for several platforms, creates a GitHub release and then pushes a Homebrew formula to a tap repository. All that wrapped in your favorite CI.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. We appreciate your contribution. Please refer to our contributing guidelines for further information.

For questions, support and general discussion, please use GitHub Discussions;

Get GoReleaser

Documentation

Documentation is hosted live at https://goreleaser.com

Badges

Release Software License Build status Codecov branch Go Doc SayThanks.io Powered By: GoReleaser Backers on Open Collective Sponsors on Open Collective Conventional Commits

Sponsors

Does your company use goreleaser? Help keep the project bug-free and feature rich by sponsoring the project.

Backers

Love our work and community? Become a backer.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Stargazers over time

Stargazers over time

Issues
  • Complete history in changelog on every release

    Complete history in changelog on every release

    Describe the bug

    Every release I do, I get a list of every commit despite using a simple semver version. I manually edit the commits down each time.

    To Reproduce

    I release using this file.

    Expected behavior

    I expect it to pick up commits since the last released version.

    Environment (please complete the following information):

    • OS: mac
    • OS version: Darwin theganyo-macbookpro2.roam.corp.google.com 18.2.0 Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64 x86_64
    • GoReleaser Version 0.104.0, commit 7c4352147b6d9636f13d2fc633cfab05d82d929c, built at 2019-03-20T02:18:40Z
    bug 
    opened by theganyo 43
  • Support Cosign keyless signing & verification

    Support Cosign keyless signing & verification

    Is your feature request related to a problem? Please describe. It is not related to a problem. It's a feature request for signing and verifying with Keyless Mode.[^1]

    Describe the solution you'd like

    GoReleaser can use the cosign tool as a command in the sigs section. In order to enable Keyless mode in cosign, we need to pass an environment variable called COSIGN_EXPERIMENTAL=1. So, we've opened another issue to enable passing environment variables to the sigs section. Also, recently, the Kyverno project did the same thing. [^2]

    [ ] - https://github.com/goreleaser/goreleaser/issues/2657 - @Dentrax

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context [^1]: https://github.com/sigstore/cosign/blob/main/KEYLESS.md [^2]: github.com/kyverno/kyverno/pull/2677

    cc: @dentrax @erkanzileli

    enhancement 
    opened by developer-guy 41
  • Release to GitLab

    Release to GitLab

    As @bernardoVale mentioned #on Slack it would be nice to support releasing to GitLab. There is a Go package for the API https://github.com/xanzy/go-gitlab. Since we also plan on adding Bintray support in #15 we might be able to combine some of the releasing logic.

    enhancement wontfix 
    opened by jorinvo 36
  • Refactor: context

    Refactor: context

    Refactor of the context package.

    We now have an artifact package.

    We now have an artifact type which can be filtered anywhere in the code, as well as filter compositions. With this set of features, we dont need specific fields for each type of artifact.

    The mutex also is in the artifact package, and we have an Artifacts type, which contains both the slice and the mutex, and also have the Add, List and Filter methods.

    I end up fixing some thing I found along the way and/or didn't work at all before:

    • docker ims from binary releases
    • multiple darwin amd64 builds on homebrew
    • Path now is always the full path (dist + folder + artifact) - before some pipes were using it differently and we have several filepath.Join(dist, artifact.Path) or similar around
    • the artifactory pipe was greatly simplified due to the previous changes
    • brew and artifactory pipes had some missing test cases which were added
    • the build pipe no longer needs to know anything about naming templates (it was a hidden dependency)
    • improved docs in several places

    I also have placed several TODOs and opened a few issues to cover problems I've found.

    This patch should allow us to add more types of artifacts easily, since all fields can be available.

    I also included an Extra field which is a map[string]string, so some pipes can add additional info (right now only the build pipe is using it).

    closes #455 closes #449

    opened by caarlos0 34
  • [Bug]: Goreleaser silently for invalid credentials on S3 uploads

    [Bug]: Goreleaser silently for invalid credentials on S3 uploads

    What happened?

    When doing a release with S3 my credentials were not set properly. goreleaser ran to completion and did not raise any errors that the S3 uploads fail.

    How can we reproduce this?

    1. Create a .goreleaser.yml that uploads to an S3 bucket.
    2. Remove credentials that give write access to that bucket
    3. Run goreleaser

    This should run to completion without alerting that the S3 uploads failed.

    goreleaser version

    goreleaser version 0.183.0
    commit: be6199f08167cc85b0b16cefc02d8106237853b1
    built by: homebrew
    
    https://goreleaser.com
    

    GoReleaser Check

    • [X] goreleaser check shows no errors

    Search

    • [X] I did search for other open and closed issues before opening this.

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct

    Additional context

    No response

    bug 
    opened by rnikoopour 31
  • packagecloud.io http 500 error on RPMs built with v0.120.x

    packagecloud.io http 500 error on RPMs built with v0.120.x

    Describe the bug

    Since the new RPM code in nfpm and goreleaser 0.120.x was introduced it is no longer possible to push RPMs to packagecloud.io.

    Packagecloud support response:

    This package is missing a lot of required RPM headers that must appear in the YUM metadata so that YUM can find this package and install it from a repository.

    I would suggest that the maintainer of this package spend some time reviewing the RPM documentation and/or requesting the tool they use for generating the RPM automatically all required RPM headers. There's lots of possible malformed RPM packages that will make our system 500; we catch a lot of the cases, but we do miss a few and will still 500 in some rare, isolated cases (like this package, which is significantly malformed).

    To Reproduce

    Steps to reproduce the behavior:

    It should be possible to reproduce this bug locally from the https://github.com/pantheon-systems/pauditd project:

    git clone [email protected]:pantheon-systems/pauditd.git
    cd pauditd
    
    curl -sL https://git.io/goreleaser | bash -s -- --snapshot --rm-dist
    

    push to an existing packagecloud.io repo:

    $ package_cloud push xxx/xxx/el/8 dist/*rpm
    
    Looking for repository at xxx/xxx... success!
    Pushing dist/pauditd-v1.1.11-next-1572710235-x86_64.rpm... Traceback (most recent call last):
            23: from /usr/local/bin/package_cloud:22:in `<main>'
            22: from /usr/local/bin/package_cloud:22:in `load'
            21: from /usr/local/lib/ruby/gems/2.6.0/gems/package_cloud-0.3.05/bin/package_cloud:4:in `<top (required)>'
            20: from /usr/local/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
            19: from /usr/local/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
            18: from /usr/local/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
            17: from /usr/local/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
            16: from /usr/local/lib/ruby/gems/2.6.0/gems/package_cloud-0.3.05/lib/package_cloud/cli/entry.rb:108:in `push'
            15: from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/benchmark.rb:293:in `measure'
            14: from /usr/local/lib/ruby/gems/2.6.0/gems/package_cloud-0.3.05/lib/package_cloud/cli/entry.rb:168:in `block in push'
            13: from /usr/local/lib/ruby/gems/2.6.0/gems/package_cloud-0.3.05/lib/package_cloud/cli/entry.rb:168:in `each'
            12: from /usr/local/lib/ruby/gems/2.6.0/gems/package_cloud-0.3.05/lib/package_cloud/cli/entry.rb:178:in `block (2 levels) in push'
            11: from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/benchmark.rb:293:in `measure'
            10: from /usr/local/lib/ruby/gems/2.6.0/gems/package_cloud-0.3.05/lib/package_cloud/cli/entry.rb:182:in `block (3 levels) in push'
             9: from /usr/local/lib/ruby/gems/2.6.0/gems/package_cloud-0.3.05/lib/package_cloud/cli/entry.rb:242:in `create_package'
             8: from /usr/local/lib/ruby/gems/2.6.0/gems/package_cloud-0.3.05/lib/package_cloud/repository.rb:52:in `create_package'
             7: from /usr/local/lib/ruby/gems/2.6.0/gems/rest-client-2.0.2/lib/restclient/request.rb:52:in `execute'
             6: from /usr/local/lib/ruby/gems/2.6.0/gems/rest-client-2.0.2/lib/restclient/request.rb:145:in `execute'
             5: from /usr/local/lib/ruby/gems/2.6.0/gems/rest-client-2.0.2/lib/restclient/request.rb:715:in `transmit'
             4: from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/net/http.rb:920:in `start'
             3: from /usr/local/lib/ruby/gems/2.6.0/gems/rest-client-2.0.2/lib/restclient/request.rb:725:in `block in transmit'
             2: from /usr/local/lib/ruby/gems/2.6.0/gems/rest-client-2.0.2/lib/restclient/request.rb:809:in `process_result'
             1: from /usr/local/lib/ruby/gems/2.6.0/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:103:in `return!'
    /usr/local/lib/ruby/gems/2.6.0/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:223:in `exception_with_response': 500 Internal Server Error (RestClient::InternalServerError)
    

    Additional context

    Workaround is to use goreleaser v0.119.3, the last release before the nfpm rpm refactor.

    Apologies I cannot provide more details at this time. If I am able to determine anything helpful I'll update this thread.

    bug 
    opened by joemiller 28
  • Support multi-platform docker images

    Support multi-platform docker images

    I would like go-releaser to support releasing multi-platform docker images using something like https://github.com/estesp/manifest-tool

    This way, if the project is being built for multiple platforms, we will only use a single docker repository.

    enhancement 
    opened by pcarranza 28
  • GoReleaser Pro, open-source, and supply chain integrity

    GoReleaser Pro, open-source, and supply chain integrity

    Hi @caarlos0,

    We've been pleased to integrate goreleaser into our release process for https://github.com/fleetdm/fleet/. In particular, making it easy to build all the necessary artifacts and upload in GitHub Actions has helped with my goal to improve transparency and address software supply chain integrity issues (discussed nicely in https://security.googleblog.com/2021/06/introducing-slsa-end-to-end-framework.html).

    We are merging a couple of our repos, and purchased an enterprise license for GoReleaser Pro to support the project and utilize the monorepo functionality. I only just discovered that the goreleaser pro features are not open-source/source-available and require utilizing a separate binary. This conflicts with our goals to increase transparency and integrity in the full lifecycle of our software by adding an un-auditable dependency (GoReleaser Pro) into the build process.

    Would you consider making the code source-available? I know this is a big ask, and it's something that we have contemplated quite a bit for our business. We've settled on making everything source-available using a license that is inspired by GitLab's License.

    Otherwise we may need to find ways to work around using GoReleaser Pro features in order to move forward with transparency in our build tooling.

    Thank you for the consideration.

    enhancement wontfix 
    opened by zwass 26
  • feat: gitea release support

    feat: gitea release support

    Add support for Gitea in release pipe

    I (and probably many others) want to create releases and upload artifacts to their Gitea instances.

    Gitea: https://gitea.io/en-us/ Gitea Go SDK: https://godoc.org/code.gitea.io/sdk/gitea

    closes #1106

    enhancement 
    opened by dtluna 26
  • feat(pipe/build): Add support for flexible build hooks

    feat(pipe/build): Add support for flexible build hooks

    This is an early prototype of a solution for #1328 to solicit early feedback.

    Usage

    builds:
      -
        env:
          - CGO_ENABLED=0
        targets:
          - darwin_amd64
          - windows_386
          - windows_amd64
        after:
          all:
            hooks:
              - zip ./signable_binaries.zip {{ range .Builds }} {{ .Path }}{{ end }}
              - echo "Signing every eligible binary..."
              - cmd: ./codesign.sh
                env:
                  - ZIP_FILE={{ .ProjectName }}_{{ .Version }}_{{ .Target }}.zip
          each:
            default_dir: "{{ .Path }}"
            hooks:
              - upx {{ .Name }}
    

    I would be happy to add some tests, perhaps some more logging and docs if we agree on the rough direction.

    opened by radeksimko 25
  • Prototype: Multiple language support with Rust

    Prototype: Multiple language support with Rust

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [X] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [X] I have read the CONTRIBUTING document.
    • [X] make ci passes on my machine.
    • [X] My change requires a change to the documentation.
    • [X] I have updated the documentation accordingly.
    • [ ] I have added tests to cover my changes.

    Why is it useful?

    This is a prototype version of #496. This version is far from complete, but it should start a first discussion or feedback round. The feedback round is important to let me / us know if it is useful to put more effort into it or to drop the idea at all.

    This PR shows how this can be done for Rust. Testing would be welcomed.

    What it does?

    It compiles a rust app with cargo build and adds it to the Artifacts.

    How can you test it?

    1. Install Rust (e.g. via https://rustup.rs/)
    2. Kickstart a new project via cargo new --bin hello
    3. Place a new .goreleaser.yaml with this content into the project
    rust:
    - target:
      - x86_64-apple-darwin
      binary: hello
    
    archive:
      format: tar.gz
      name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}"
    
    1. Tag it and release it like every other tool

    What is missing?

    • [ ] Unit tests
    • [ ] Proper testing with other pipes

    Challenges

    • [ ] Goos, Goarch and Goarm are spreaded accross the codebase and used in a specific way (e.g. for templating). In the Rust context this adds a challenge, because targets are not splitted into the specific parts. They are represented like one string (e.g. x86_64-apple-darwin for Mac) known from LLVM
    • [ ] Copy / Paste code: Right now we just copied many of the code parts. Reusage would make sense here
    opened by andygrunwald 25
  • HomeBrew Dependencies Version

    HomeBrew Dependencies Version

    Is your feature request related to a problem? Please describe.

    Currently, There is an option to mark a dependency as Optional but you can specify the version for the dependency. It would be great if we can also bake the version in the configuration because it's already supported in the HomeBrew Formula.

    Describe the solution you'd like

    Update the config to have version string as an option

    type HomebrewDependency struct {
    	Name string `yaml:"name,omitempty"`
    	Type string `yaml:"type,omitempty"`
            Version string `yaml:"version,omitempty"`
    }
    

    Describe alternatives you've considered

    There are no other options for that at the moment other than updating the Formula manually https://github.com/goreleaser/goreleaser/discussions/3283

    Search

    • [X] I did search for other open and closed issues before opening this.

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct

    Additional context

    No response

    enhancement good-first-issue 
    opened by abebars 3
  • nfpm bindings should support RPM

    nfpm bindings should support RPM "Provides" & "Changelog"

    Is your feature request related to a problem? Please describe.

    Red Hat certification has specific requirements on the contents of an RPM's "provides" and "changelog". nfpm supports setting these for the RPM spec but the GoReleaser bindings (https://github.com/goreleaser/goreleaser/blob/fe7e2123bda5a605d34af695588fec57a535f0b3/internal/pipe/nfpm/nfpm.go) do not provide the ability to specify them.

    Describe the solution you'd like

    RPM overrides for both fields should be provided.

    Describe alternatives you've considered

    The alternative is to modify the package after GoReleaser has created it, either by creating packages directly with nfpm or using rpmrebuild, both of which add an extra unnecessary step.

    Search

    • [X] I did search for other open and closed issues before opening this.

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct

    Additional context

    No response

    enhancement good-first-issue 
    opened by benr 2
  • Support --single-target with release

    Support --single-target with release

    Is your feature request related to a problem? Please describe.

    I run release with --skip-publish` in CI so I can test packages and container images with Inspec. In this case, I really only need linux artifacts to be built.

    The build command has --single-target but it does not build packages or container images.

    Describe the solution you'd like

    I would like a mechanism for building binaries, packages, and container images with --single-target.

    Describe alternatives you've considered

    Generating a .goreleaser file that contains only linux, but this feels excessive.

    Search

    • [X] I did search for other open and closed issues before opening this.

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct

    Additional context

    This ability will speed up CI significantly due to skipping windows and darwin (both of which build for multiple architectures).

    enhancement 
    opened by jsirianni 3
Releases(v1.10.3)
Owner
GoReleaser
Deliver Go binaries as fast and easily as possible
GoReleaser
Builds and restarts a Go project when it crashes or some watched file changes

gaper Used to build and restart a Go project when it crashes or some watched file changes Aimed to be used in development only. Changelog See Releases

Max Claus Nunes 55 Jun 21, 2022
🚀 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.

gowatch 中文文档 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file. Installation To insta

silenceper 716 Aug 4, 2022
Please is a cross-language high-performance extensible build system for reproducible multi-language builds.

Please is a cross-language build system with an emphasis on high performance, extensibility and reproducibility. It supports a number of popular languages and can automate nearly any aspect of your build process.

Thought Machine 2.1k Aug 9, 2022
Embed static files in Go binaries (replacement for gobuffalo/packr)

Pkger github.com/markbates/pkger is a tool for embedding static files into Go binaries. It will, hopefully, be a replacement for github.com/gobuffalo/

Mark Bates 1.2k Jul 27, 2022
Golang binaries compiled on-demand for your system

Go Binaries Go Binaries is an on-demand binary server, allowing non-Go users to quickly install tools written in Go without installing go itself, and

TJ Holowaychuk 747 Aug 10, 2022
Package binaries for different operating systems in a single script, executable everywhere.

CrossBin Packages MacOS, Linux and Windows binaries, into a single script that is executable everywhere and executes the correct binary for the system

null 2 Dec 14, 2021
An extremely fast JavaScript bundler and minifier

An extremely fast JavaScript bundler and minifier

Evan Wallace 32.7k Aug 7, 2022
Monitoring changes in the source file and automatically compile and run (restart).

dogo Monitoring changes in the source file and automatically compile and run (restart). 中文 Install go get github.com/liudng/dogo Create config Here's

null 248 Jul 6, 2022
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

#1 Golang live reload and task runner Content - ⭐️ Top Features - ???? Get started - ?? Config sample - ?? Commands List - ?? Support and Suggestions

Oxequa 4.3k Aug 11, 2022
Various tools for usage with Golang like installer, github tool and cloud features.

Gopei2 (Go Programming Environment Installer) Gopei shell install Go compiler, LiteIDE and configure for you the entire environment, variables, paths,

George Calianu 100 May 23, 2022
a build tool for Go, with a focus on cross-compiling, packaging and deployment

goxc NOTE: goxc has long been in maintenance mode. Ever since Go1.5 supported simple cross-compilation, this tool lost much of its value. There are st

Am Laher 1.7k Jul 28, 2022
Build system and task runner for Go projects

Gilbert is task runner that aims to provide declarative way to define and run tasks like in other projects like Gradle, Maven and etc.

Gilbert 101 Jun 28, 2022
A small utility that aims to automate and simplify some tasks related to software release cycles.

Stork is a small utility that aims to automate and simplify some tasks related to software release cycles such as reading the current version from a f

Simone Margaritelli 42 Jul 23, 2022
Build and (re)start go web apps after saving/creating/deleting source files.

unmaintained Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web f

Andrea Franz 3.4k Aug 10, 2022
NFPM is Not FPM - a simple deb, rpm and apk packager written in Go

NFPM NFPM is Not FPM - a simple deb, rpm and apk packager written in Go. Why While fpm is great, for me, it is a bummer that it depends on ruby, tar a

GoReleaser 1.5k Aug 13, 2022
KintoHub is an open source build and deployment platform designed with a developer-friendly interface for Kubernetes.

What is Kintohub? KintoHub is an open source build and deployment platform designed with a developer-friendly interface for Kubernetes. Build your cod

KintoHub 30 Jun 7, 2022
Moldy CLI the best project starter and manager of the world

Moldy The best project starter of the world ?? What is Moldy ? Hey I present Moldy this beautiful tool that will solve your life in creating, managing

Moldy Community 23 Jun 26, 2022
Hooks-goreleaser - GoReleaser hooks plugin

?? hooks-goreleaser The GoReleaser integration for go-semantic-release. Usage Us

null 1 Jan 30, 2022
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

null 0 Nov 22, 2021
Bundle k6 with extensions as fast and easily as possible

xk6bundler xk6bundler is a CLI tool and GitHub Action makes bundle k6 with extensions as fast and easily as possible. Features Build for multiple targ

Iván Szkiba 9 Jul 23, 2022
Create all possible binaries from go files

nextBuild.go Create all possible binaries of a project in go ChangeLog 0.0.1 ─ First release. Flags You can alter a few things when creating the binar

FlamesX128 3 Dec 16, 2021
Create all possible binaries from go files

nextBuild.go Create all possible binaries of a project in go ChangeLog 0.0.1 ─ First release. Flags You can alter a few things when creating the binar

FlamesX128 3 Dec 16, 2021
Create all possible binaries from go files

gopher-build-all Create all possible binaries of a project in go ChangeLog 0.0.2 Flags bin-folder-name ─ With this flag you can rename the output dire

FlamesX128 3 Dec 16, 2021
Example goreleaser + github actions config with keyless signing and SBOM generation

supply-chain-example GoReleaser + Go Mod proxying + Cosign keyless signing + Syft SBOM generation example. How it works GoReleaser manages the entire

GoReleaser 43 Jul 5, 2022
Manfred Touron 220 Aug 2, 2022
Eget is the best way to easily get pre-built binaries for your favorite tools.

Eget: easy pre-built binary installation Eget is the best way to easily get pre-built binaries for your favorite tools. It downloads and extracts pre-

Zachary Yedidia 322 Aug 12, 2022
Empty an S3 bucket as fast as possible 💨

s3-destroyer Iteratively calls ListObjects, add objects keys to a buffer and calls DeleteObject in goroutines. Usage -access-key string s3 a

Stanislas 2 Dec 13, 2021
yq lets you read YAML files easily on the terminal. You can find key/values easily

yq yq lets you read YAML files easily on the terminal. You can find key/values easily. Motivation Reading yaml configurations for k8s file becomes ard

Farhan 3 Nov 2, 2021