1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00
Deliver Go binaries as fast and easily as possible https://goreleaser.com/
Go to file
Carlos Alexandro Becker 6f98934788 stop building goreleaser.exe
it will probably not work on windows anyway (e.g.: calling `git` instead of `git.exe`).

The get/latest script also won't work on Windows.

For me, we can assume that this don't work and that's it...
2017-01-16 19:09:53 -02:00
clients Merge branch 'master' into goreleaser.example.yml 2017-01-15 08:49:49 -02:00
config strip config sufix from config structs 2017-01-15 14:37:07 -02:00
context strip config sufix from config structs 2017-01-15 14:37:07 -02:00
pipeline fail brew pipe if there is no darwin_amd64 build 2017-01-16 14:52:27 -02:00
sha256sum golint comments 2017-01-15 08:48:27 -02:00
.editorconfig added replacements support 2017-01-11 19:24:17 -02:00
.gitignore gitignore 2017-01-15 09:11:17 -02:00
.travis.yml removed debug line 2017-01-02 14:33:26 -02:00
CODE_OF_CONDUCT.md added code of conduct 2017-01-02 13:36:39 -02:00
CONTRIBUTING.md renamed package 2017-01-14 20:01:32 -02:00
glide.lock renamed package 2017-01-14 20:01:32 -02:00
glide.yaml renamed package 2017-01-14 20:01:32 -02:00
goreleaser.example.yml Update goreleaser.example.yml 2017-01-15 15:54:53 -02:00
goreleaser.yml stop building goreleaser.exe 2017-01-16 19:09:53 -02:00
LICENSE.md readme, license and shit 2016-12-28 22:55:23 -02:00
main.go goimports 2017-01-14 20:13:49 -02:00
Makefile added fmt task to makefile, improved the rest 2017-01-15 09:11:37 -02:00
README.md Update README.md 2017-01-15 15:58:45 -02:00

GoReleaser

goreleaser

GoReleaser builds Go binaries for several platforms, creates a GitHub release and then pushes a Homebrew formulae to a 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. Please report unacceptable behavior to root@carlosbecker.com.

Release Software License Travis Go Report Card Powered By: GoReleaser

Why?

The idea started with a simple shell script, but it quickly became more complex and I also wanted to publish binaries via Homebrew.

So, the all-new GoReleaser was born.

Usage

  • You need to export a GITHUB_TOKEN environment variable with the repo scope selected. You can create one here.

  • GoReleaser uses the latest Git tag of your repository, so you need to create a tag first.

  • Now you can run goreleaser at the root of your repository:

curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash

This will build main.go as binary, for Darwin and Linux (amd64 and i386), archive the binary and common files as .tar.gz, and finally, publish a new GitHub release in the repository with archives uploaded.

Of course, all this can be customized!

Customization

For customization create a goreleaser.yml file in the root of your repository.

A complete and commented example can be found here.

You can also check the goreleaser.yml used by GoReleaser itself.

A note about main.version

GoReleaser always sets a main.version ldflag. You can use it in your main.go file:

package main

var version = "master"

func main() {
  println(version)
}

And this version will always be the name of the current tag.

Wire it with Travis CI

You may want to wire this to auto-deploy your new tags on Travis, for example:

after_success:
  test -n "$TRAVIS_TAG" && curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash

What the end result looks like

The release on GitHub looks pretty much like this:

image

And the Homebrew formulae would look like:

class Release < Formula
  desc "Deliver Go binaries as fast and easily as possible"
  homepage "https://github.com/goreleaser/goreleaser"
  url "https://github.com/goreleaser/goreleaser/releases/download/v0.2.8/release_Darwin_x86_64.tar.gz"
  version "v0.2.8"
  sha256 "9ee30fc358fae8d248a2d7538957089885da321dca3f09e3296fe2058e7fff74"

  def install
    bin.install "release"
  end
end

How to contribute

Please refer to our contributing guidelines.

Badges

Feel free to use it in your own projects:

[![Powered By: GoReleaser](https://img.shields.io/badge/powered%20by-goreleaser-green.svg?style=flat-square)](https://github.com/goreleaser)