ci: add step for checking release

This commit is contained in:
2024-04-03 19:57:35 +02:00
parent 4a8dc7d944
commit 27da6e122d
2 changed files with 18 additions and 16 deletions
+16 -14
View File
@@ -3,6 +3,7 @@ include:
stages:
- build
- test
- deploy-prod
- release
@@ -61,30 +62,31 @@ deploy-prod:
environment:
name: prod
check_release:
stage: test
image:
name: ${GORELEASER_IMAGE}
entrypoint: [ '' ]
script: |
goreleaser check
goreleaser release --snapshot --clean
release:
stage: release
image: docker:stable
services:
- docker:${DOCKER_DIND_VERSION}
image:
name: ${GORELEASER_IMAGE}
entrypoint: [ '' ]
variables:
GORELEASER_IMAGE: goreleaser/goreleaser:v1.25.0-amd64
# Disable shallow cloning so that goreleaser can diff between tags to
# generate a changelog.
GIT_DEPTH: 0
GITLAB_TOKEN: $GITLAB_CI_TOKEN
# Only run this release job for tags, not every commit (for example).
rules:
- if: $CI_COMMIT_TAG
script: |
docker pull $GORELEASER_IMAGE
# GITLAB_TOKEN is needed to create GitLab releases.
# DOCKER_* are needed to push Docker images.
docker run --rm --privileged \
-v $PWD:/src \
-w /src \
-v /var/run/docker.sock:/var/run/docker.sock \
-e GITLAB_TOKEN \
$GORELEASER_IMAGE release --rm-dist
goreleaser release --clean
+2 -2
View File
@@ -17,10 +17,10 @@ builds:
brews:
- name: unbound-schemas
tap:
repository:
owner: unboundsoftware
name: homebrew-taps
folder: Formula
directory: Formula
install: |
bin.install "schemactl"
commit_author: