awl/.drone.jsonnet
Sam Therapy eda2e5b55f
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
More work!
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-07-22 23:22:43 +02:00

68 lines
No EOL
1.1 KiB
Text

// SPDX-License-Identifier: BSD-3-Clause
local testing(version, arch) = {
kind: "pipeline",
name: version + "-" + arch ,
platform: {
arch: arch
},
steps: [
{
name: "lint",
image: "rancher/drone-golangci-lint:latest"
},
{
name: "test",
image: "golang:" + version,
commands: [
"go test -race -v ./... -cover"
]
},
]
};
// "Inspired by" https://goreleaser.com/ci/drone/
local release() = {
kind: "pipeline",
name: "release",
trigger: {
event: "tag"
},
steps: [
{
name: "fetch",
image: "docker:git",
commands : [
"git fetch --tags"
]
},
{
name: "test",
image: "golang",
commands: [
"go test -race -v ./... -cover"
]
},
{
name: "release",
image: "goreleaser/goreleaser",
environment: {
"GITEA_TOKEN": {
from_secret: "GITEA_TOKEN"
}
},
commands: [
"goreleaser release"
],
// when: {
// event: "tag"
// }
}
]
};
[
testing("1.18", "amd64"),
testing("1.18", "arm64"),
release()
]