Skip to content

Commit

Permalink
Merge pull request #12 from circleci/releases
Browse files Browse the repository at this point in the history
CIRCLE-11768 Install goreleaser and use it to publish binaries to GitHub releases.
  • Loading branch information
Zachary Scott authored Jun 13, 2018
2 parents 76570ac + a81cccd commit ec0808d
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 14 deletions.
33 changes: 33 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ workflows:
- test
- coverage
- lint
- deploy:
requires:
- test
- coverage
- lint
filters:
branches:
only: master

jobs:
test:
Expand Down Expand Up @@ -53,3 +61,28 @@ jobs:
go get -u github.com/alecthomas/gometalinter
gometalinter --install
- run: make lint

deploy:
docker:
- image: circleci/golang:1.10
environment:
GORELEASER_URL: https://github.com/goreleaser/goreleaser/releases/download/v0.77.1/goreleaser_amd64.deb

working_directory: /go/src/github.com/circleci/circleci-cli
steps:
- checkout
- run:
name: Install GoReleaser
command: |
curl --silent --location --fail --retry 3 $GORELEASER_URL > /tmp/goreleaser_amd64.deb
sudo apt install /tmp/goreleaser_amd64.deb
- run:
name: Tag Repo
command: |
git config --global user.email "[email protected]"
git config --global user.name "Marc O'Morain"
git tag -a "v0.1.$CIRCLE_BUILD_NUM" -m "Release v0.1.$CIRCLE_BUILD_NUM"
git push origin "v0.1.$CIRCLE_BUILD_NUM"
- run:
name: Release
command: goreleaser
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ build/
TODO
circleci-cli
coverage.txt
dist/
13 changes: 13 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
archive:
format_overrides:
- goos: windows
format: zip

builds:
- binary: circleci-beta
goos:
- windows
- darwin
- linux
goarch:
- amd64
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,12 @@ For example, I've the following in my `.emacs.d/init.el`:
(add-hook 'before-save-hook 'gofmt-before-save)
(require 'go-rename)
```

## Viewing API Documentation

You can view the documentation for this project in your browser using `godoc`.

After installing it via `make dev`.

1. Run `make doc`.
2. Access http://localhost:6060/pkg/github.com/circleci/circleci-cli/
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,3 @@ This should pretty-print back a JSON response from the server:
}
}
```

## Known Issues

* ...

## Viewing API Documentation

You can view the documentation for this project in your browser using `godoc`.

After installing it via `make dev`.

1. Run `make doc`.
2. Access http://localhost:6060/pkg/github.com/circleci/circleci-cli/

0 comments on commit ec0808d

Please sign in to comment.