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