Skip to content

Commit

Permalink
Merge pull request #342 from ParadigmFoundation/go-releaser
Browse files Browse the repository at this point in the history
Add goreleaser to drone's release pipeline
  • Loading branch information
Henry Harder authored Oct 23, 2019
2 parents 9e0ff31 + db33600 commit 8599c73
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 153 deletions.
17 changes: 16 additions & 1 deletion .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,22 @@ local KosuGeth(name) = Image(name, "kosu-test-geth:latest") {
"NPM_PASS": { "from_secret": "npm_password" },

},
}
},
Image("gorelease", "go-kosu") {
"commands": [
"git fetch --tags",
"cd ./packages/go-kosu",
"curl -sL https://git.io/goreleaser | bash -s -- --skip-validate"
],
"environment": {
"GITHUB_TOKEN": { "from_secret": "github_token" },
},
"when": {
"ref": {
"include": ["refs/tags/@kosu/go-kosu*"]
}
}
}
],
"depends_on": [
"tests"
Expand Down
16 changes: 15 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ steps:
image: gcr.io/kosu-io/go-kosu-ci:latest
commands:
- cd packages/go-kosu
- "export KOSU_TEST_NODES=$(pwd)/testnet/node0@kosu-node-1:26657,$(pwd)/testnet/node1@kosu-node-1:26657,$(pwd)/testnet/node2@kosu-node-1:26657,$(pwd)/testnet/node3@kosu-node-1:26657"
- export KOSU_TEST_NODES=$(pwd)/testnet/node0@kosu-node-1:26657,$(pwd)/testnet/node1@kosu-node-1:26657,$(pwd)/testnet/node2@kosu-node-1:26657,$(pwd)/testnet/node3@kosu-node-1:26657
- make ci
depends_on:
- build-project
Expand Down Expand Up @@ -154,6 +154,20 @@ steps:
status:
- success

- name: gorelease
pull: always
image: gcr.io/kosu-io/go-kosu
commands:
- git fetch --tags
- cd ./packages/go-kosu
- curl -sL https://git.io/goreleaser | bash -s -- --skip-validate
environment:
GITHUB_TOKEN:
from_secret: github_token
when:
ref:
- refs/tags/@kosu/go-kosu*

trigger:
event:
- tag
Expand Down
30 changes: 11 additions & 19 deletions packages/go-kosu/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
project_name: kosu

builds:
- binary: kosud
- id: kosud
binary: kosud
main: ./cmd/kosud/main.go
ldflags: &ldflags
- -s -w -X github.com/ParadigmFoundation/kosu-monorepo/packages/go-kosu/version.Version={{.Version}}
- -X github.com/ParadigmFoundation/kosu-monorepo/packages/go-kosu/version.GitCommit={{.ShortCommit}}

goos:
- linux
- darwin
goarch:
- amd64

- binary: kosu-cli
- id: kosu-cli
binary: kosu-cli
main: ./cmd/kosu-cli/main.go
ldflags: *ldflags
goos:
- linux
- darwin
goarch:
- amd64

archives:
- id: kosud
replacements:
amd64: x86_64
format: binary

- id: kosu-cli
replacements:
amd64: x86_64
format: binary
- id: kosu
name_template: "{{ .ProjectName }}-{{ .Os }}"

checksum:
name_template: 'checksums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
132 changes: 0 additions & 132 deletions packages/go-kosu/dist/config.yaml

This file was deleted.

0 comments on commit 8599c73

Please sign in to comment.