2019-01-12 20:45:25 -08:00
|
|
|
workflow "check-and-release" {
|
|
|
|
on = "push"
|
|
|
|
resolves = ["release"]
|
|
|
|
}
|
|
|
|
|
|
|
|
action "check" {
|
|
|
|
uses = "./.github/actions/check"
|
|
|
|
}
|
|
|
|
|
2019-01-23 11:51:22 -08:00
|
|
|
action "release-filter" {
|
2019-01-12 20:45:25 -08:00
|
|
|
needs = ["check"]
|
|
|
|
uses = "actions/bin/filter@master"
|
2019-02-07 09:39:04 -08:00
|
|
|
args = "tag 'v*'"
|
2019-01-17 00:45:37 -08:00
|
|
|
}
|
2019-01-12 20:45:25 -08:00
|
|
|
|
2019-01-23 06:13:09 -08:00
|
|
|
# only release on `v*` tags
|
2019-01-17 00:45:37 -08:00
|
|
|
action "release" {
|
2019-01-23 11:51:22 -08:00
|
|
|
needs = ["release-filter"]
|
2019-01-23 07:35:12 -08:00
|
|
|
uses = "docker://goreleaser/goreleaser:v0.98"
|
2019-01-12 20:45:25 -08:00
|
|
|
args = "release"
|
|
|
|
secrets = ["GITHUB_TOKEN"]
|
2019-01-17 00:45:37 -08:00
|
|
|
}
|
|
|
|
|
2019-01-23 06:11:53 -08:00
|
|
|
# local action for `make build`
|
2019-01-17 00:45:37 -08:00
|
|
|
action "build" {
|
2019-01-23 07:35:12 -08:00
|
|
|
uses = "docker://goreleaser/goreleaser:v0.98"
|
2019-01-17 00:45:37 -08:00
|
|
|
args = "--snapshot --rm-dist"
|
|
|
|
secrets = ["SNAPSHOT_VERSION"]
|
2019-01-23 06:13:09 -08:00
|
|
|
}
|
2019-01-23 11:51:22 -08:00
|
|
|
|
|
|
|
# local action for `make vendor`
|
|
|
|
action "vendor" {
|
|
|
|
uses = "docker://golang:1.11.4"
|
|
|
|
args = "go mod vendor"
|
|
|
|
}
|