Skip to content
Snippets Groups Projects
Commit b2752bd9 authored by Daniel Dehennin's avatar Daniel Dehennin
Browse files

feat(semantic-release): new rules for prerelease

New `.on-testing-with-semantic-release-config` and
`.on-dev-with-semantic-release-config` rules.

Create a new `.semantic-release:stable` template job and use it for
the default `semantic-release` job.
parent c7acd281
No related branches found
No related tags found
Loading
......@@ -47,6 +47,9 @@
# We can't merge rules with `!reference` until we switch to Gitlab >= 14.3
# https://gitlab.com/gitlab-org/gitlab/-/issues/322992
# Use a `.rules-map` as a workaround
#
semantic-release:
extends: .semantic-release:stable
.on-stable-with-semantic-release-config:
rules:
......@@ -63,7 +66,37 @@
- .releaserc.js
when: on_success
semantic-release:
.on-testing-with-semantic-release-config:
rules:
- !reference [.rules-map, not-on-schedule]
- !reference [.rules-map, not-on-draft]
- !reference [.rules-map, not-on-semantic-release-commit]
- if: $CI_COMMIT_BRANCH == $TESTING_BRANCH
exists:
- release.config.js
- .releaserc
- .releaserc.yaml
- .releaserc.yml
- .releaserc.json
- .releaserc.js
when: on_success
.on-dev-with-semantic-release-config:
rules:
- !reference [.rules-map, not-on-schedule]
- !reference [.rules-map, not-on-draft]
- !reference [.rules-map, not-on-semantic-release-commit]
- if: $CI_COMMIT_BRANCH == $DEV_BRANCH
exists:
- release.config.js
- .releaserc
- .releaserc.yaml
- .releaserc.yml
- .releaserc.json
- .releaserc.js
when: on_success
.semantic-release:stable:
stage: release
extends: .on-stable-with-semantic-release-config
image: "$SEMANTIC_RELEASE_IMAGE"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment