Skip to content

Commit

Permalink
add goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
alastairruhm committed Jun 1, 2018
1 parent 92de348 commit 46099ca
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 8 deletions.
55 changes: 55 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# goreleaser.yml
# Build customization
build:
main: main.go
binary: ipsarch
goos:
- windows
- darwin
- linux
goarch:
- amd64
ldflags: -s -w
release:
github:
owner: alastairruhm
name: ipsarch
# Archive customization
archive:
format: tar.gz
replacements:
amd64: 64-bit
darwin: macOS
files:
- README.md
- LICENSE

brew:
github:
owner: alastairruhm
name: homebrew-tap

# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: alastairruhm
email: alastairruhm@gmail.com

# Folder inside the repository to put the formula.
# Default is the root folder.
folder: Formula

# Caveats for the user of your binary.
# Default is empty.
caveats: ""

# Your app's homepage.
# Default is empty.
homepage: "https://github.com/alastairruhm/ipsearch"

# Your app's description.
# Default is empty.
description: "search ip location"

install: |
bin.install "ipsearch"
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
language: go

go:
- 1.7
- "1.8"
- "1.9"

install:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
# - go get github.com/tcnksm/ghr
- go get github.com/mattn/goveralls

script:
- go test -v -covermode=count -coverprofile=coverage.out
- goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN

after_success:
- gox -os "linux darwin" -arch "386 amd64" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
# - gox -os "linux darwin" -arch "386 amd64" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash

deploy:
provider: script
script: ghr --username alastairruhm --token $GITHUB_TOKEN --replace --debug $(git tag -l --contains HEAD) dist/
on:
tags: true
# deploy:
# provider: script
# script: ghr --username alastairruhm --token $GITHUB_TOKEN --replace --debug $(git tag -l --contains HEAD) dist/
# on:
# tags: true

notifications:
slack: ruhm-pacino:vcSqblVd1vSDgaOzWLNbThfS
Expand Down

0 comments on commit 46099ca

Please sign in to comment.