Skip to content

Commit

Permalink
Add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderK5 committed Nov 2, 2018
1 parent 98ad974 commit 50d6dcf
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sem
bin/
cli
dist
39 changes: 39 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
project_name: cli
before:
hooks:
- go get ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- 386
- amd64
archive:
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: Darwin
linux: Linux
386: i386
amd64: x86_64
checksum:
name_template: '{{ .ProjectName }}_checksums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- Merge pull request
- Merge branch
brew:
github:
owner: semaphoreci
name: homebrew-tap
folder: Formula
homepage: https://semaphoreci.com
description: Semaphore 2.0 command line interface.
test: |
system "#{bin}/sem version"
24 changes: 24 additions & 0 deletions .semaphore/brewrelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "v1.0"
name: Release
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
blocks:
- name: "Release"
task:
env_vars:
- name: GO111MODULE
value: "on"
secrets:
- name: sem-robot-ghtoken
prologue:
commands:
- sem-version go 1.11
- "export GOPATH=~/go"
- "export PATH=/home/semaphore/go/bin:$PATH"
- checkout
jobs:
- name: Sem Cli
commands:
- curl -sL https://git.io/goreleaser | bash -s -- --rm-dist
7 changes: 7 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ promotions:

- name: Release Stable
pipeline_file: "stable.yml"

- name: chmrelease
pipeline_file: brewrelease.yml
auto_promote_on:
- result: passed
branch:
- "^refs/tags/v*"

0 comments on commit 50d6dcf

Please sign in to comment.