image: "golang:alpine" stages: - "linter" - "testing" - "build" 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" build: stage: "build" needs: - "testing" image: "cr.simoncor.net/siempie/go-build:latest" script: - "GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o gogitlabber cmd/gogitlabber/*.go" artifacts: name: "${CI_PROJECT_NAME}" paths: - "gogitlabber" release: stage: "release" needs: - "build" 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"