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: stages:
- build - build
- test
- deploy-prod - deploy-prod
- release - release
@@ -61,30 +62,31 @@ deploy-prod:
environment: environment:
name: prod name: prod
check_release:
stage: test
image:
name: ${GORELEASER_IMAGE}
entrypoint: [ '' ]
script: |
goreleaser check
goreleaser release --snapshot --clean
release: release:
stage: release stage: release
image: docker:stable image:
services: name: ${GORELEASER_IMAGE}
- docker:${DOCKER_DIND_VERSION} entrypoint: [ '' ]
variables: variables:
GORELEASER_IMAGE: goreleaser/goreleaser:v1.25.0-amd64
# Disable shallow cloning so that goreleaser can diff between tags to # Disable shallow cloning so that goreleaser can diff between tags to
# generate a changelog. # generate a changelog.
GIT_DEPTH: 0 GIT_DEPTH: 0
GITLAB_TOKEN: $GITLAB_CI_TOKEN
# Only run this release job for tags, not every commit (for example). # Only run this release job for tags, not every commit (for example).
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
script: | script: |
docker pull $GORELEASER_IMAGE goreleaser release --clean
# 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
+2 -2
View File
@@ -17,10 +17,10 @@ builds:
brews: brews:
- name: unbound-schemas - name: unbound-schemas
tap: repository:
owner: unboundsoftware owner: unboundsoftware
name: homebrew-taps name: homebrew-taps
folder: Formula directory: Formula
install: | install: |
bin.install "schemactl" bin.install "schemactl"
commit_author: commit_author: