feat(ci): move testing and releasing

This commit is contained in:
Simon Cornet 2025-06-16 13:26:53 +02:00
commit b94762ae5f
3 changed files with 28 additions and 22 deletions

View file

@ -10,27 +10,9 @@ include:
# linting # linting
- component: "$CI_SERVER_FQDN/components/golanglint/golanglint@v1.0.0" - component: "$CI_SERVER_FQDN/components/golanglint/golanglint@v1.0.0"
inputs:
stage: "linting"
testing: # testing
stage: "testing" - local: ".gitlab/testing.yaml"
needs:
- "linting"
image: "cr.simoncor.net/siempie/go-build:latest"
script:
- "go test cmd/gogitlabber/*.go"
releasing: # releaseing
stage: "releasing" - local: ".gitlab/releasing.yaml"
needs:
- "testing"
image:
name: "goreleaser/goreleaser:v2.10.2"
entrypoint: [""]
rules:
- if: '$CI_COMMIT_TAG'
variables:
GITLAB_TOKEN: '$GORELEASER_GITLAB_TOKEN'
script:
- "goreleaser release --clean"

15
.gitlab/releasing.yaml Normal file
View file

@ -0,0 +1,15 @@
---
releasing:
stage: "releasing"
needs:
- "testing"
image:
name: "goreleaser/goreleaser:v2.10.2"
entrypoint: [""]
rules:
- if: '$CI_COMMIT_TAG'
variables:
GITLAB_TOKEN: '$GORELEASER_GITLAB_TOKEN'
script:
- "goreleaser release --clean"

9
.gitlab/testing.yaml Normal file
View file

@ -0,0 +1,9 @@
---
testing:
stage: "testing"
needs:
- "linting"
image: "cr.simoncor.net/siempie/go-build:latest"
script:
- "go test cmd/gogitlabber/*.go"