gogitlabber/.gitlab-ci.yml

31 lines
597 B
YAML

stages:
- "linter"
- "testing"
- "release"
linter:
stage: "linter"
image: "golangci/golangci-lint:latest-alpine"
script:
- "golangci-lint run"
testing:
stage: "testing"
needs:
- "linter"
image: "cr.simoncor.net/siempie/go-build:latest"
script:
- "go test cmd/gogitlabber/*.go"
release:
stage: "release"
needs:
- "testing"
image:
name: "goreleaser/goreleaser:v2.8.2"
entrypoint: [""]
rules:
- if: "$CI_COMMIT_TAG"
script:
- export GITLAB_TOKEN="$GORELEASER_GITLAB_TOKEN"
- "goreleaser release --rm-dist --changelog=changelog.md"