1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-18 03:56:52 +02:00

docs: fix deprecation keyword in .gitlab-ci.yml (#4964)

`only` keyword in `.gitlab-ci.yml` is now deprecated.

c.f. https://docs.gitlab.com/ee/ci/yaml/#only--except

So I migrated because GitLab now recommends using `rules:if`

c.f.
https://docs.gitlab.com/ee/ci/jobs/job_rules.html#run-jobs-only-in-specific-pipeline-types
This commit is contained in:
Go Sueyoshi 2024-06-30 03:53:32 +09:00 committed by GitHub
parent a4643a1fc9
commit 55249e73da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,8 +40,8 @@ release:
image:
name: goreleaser/goreleaser
entrypoint: [""]
only:
- tags
rules:
- if: $CI_COMMIT_TAG
variables:
# Disable shallow cloning so that goreleaser can diff between tags to
# generate a changelog.
@ -88,9 +88,8 @@ release:
GIT_DEPTH: 0
# Only run this release job for tags, not every commit (for example).
only:
refs:
- tags
rules:
- if: $CI_COMMIT_TAG
script: |
# GITLAB_TOKEN is needed to create GitLab releases.