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