diff --git a/README.md b/README.md index 8ddd3f61beedcbbd2877deb0e4307ef7f3527433..20d94c90d485878f277866ce6cf235678f320c64 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ As specified in the previous chapter, these variables are only used to generated | `changelog-file` / `SEMREL_CHANGELOG_FILE` | [changelogFile @semantic-release/changelog option](https://github.com/semantic-release/changelog#options). | _none_ (use the plugin default value which is `CHANGELOG.md`). | | `changelog-title` / `SEMREL_CHANGELOG_TITLE` | [changelogTitle @semantic-release/changelog option](https://github.com/semantic-release/changelog#options). You might want to use markdown format (for example `# MyApp Changelog`). | _none_ | | `dry-run` / `SEMREL_DRY_RUN` | Activate the [dryRun semantic-release option](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#dryrun) if present. | _none_ | +| `extra-args` / `SEMREL_EXTRA_ARGS` | [Extra options](https://semantic-release.gitbook.io/semantic-release/usage/configuration#options) to pass to semantic-release. | _none_ | | `auto-release-enabled` / `SEMREL_AUTO_RELEASE_ENABLED` | When set to `true` the job start automatically. When not set (default), the job is manual. | _none_ | | `branches-ref` / `SEMREL_BRANCHES_REF` | Regular expression pattern matching branches from which releases should happen (should match your [semantic-release configuration](https://semantic-release.gitbook.io/semantic-release/usage/configuration#branches)) | `/^(master\|main)$/` | | `tag-format` / `SEMREL_TAG_FORMAT` | [tagFormat semantic-release option](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#tagformat). :warning: don't forget to double the `$` character so it is not interpreted by GitLab. | `$${version}` | diff --git a/kicker.json b/kicker.json index 7a89db0d054d0bc325925f0282ca4675fa98aa42..ecf477be33158d319d522f2afc1de96a4d3bc3be 100644 --- a/kicker.json +++ b/kicker.json @@ -78,6 +78,11 @@ "type": "boolean", "advanced": true }, + { + "name": "SEMREL_EXTRA_ARGS", + "description": "[Extra options](https://semantic-release.gitbook.io/semantic-release/usage/configuration#options) to pass to semantic-release.", + "advanced": true + }, { "name": "SEMREL_AUTO_RELEASE_ENABLED", "description": "When set the job start automatically. When not set (default), the job is manual.", diff --git a/templates/gitlab-ci-semrel.yml b/templates/gitlab-ci-semrel.yml index 867a2d13ea0c90582a3de0552f5eb8d2499f98bd..48242bcef05a56c9eb5a447c89ad76eea5ea18c4 100644 --- a/templates/gitlab-ci-semrel.yml +++ b/templates/gitlab-ci-semrel.yml @@ -55,6 +55,9 @@ spec: description: For generated `.releaserc` file only. Activate the [dryRun semantic-release option](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#dryrun) if present. type: boolean default: false + extra-args: + description: "[Extra options](https://semantic-release.gitbook.io/semantic-release/usage/configuration#options) to pass to semantic-release." + default: '' auto-release-enabled: description: When set the job start automatically. When not set (default), the job is manual. type: boolean @@ -134,6 +137,7 @@ variables: SEMREL_CHANGELOG_FILE: $[[ inputs.changelog-file ]] SEMREL_CHANGELOG_TITLE: $[[ inputs.changelog-title ]] SEMREL_DRY_RUN: $[[ inputs.dry-run ]] + SEMREL_EXTRA_ARGS: $[[ inputs.extra-args ]] SEMREL_AUTO_RELEASE_ENABLED: $[[ inputs.auto-release-enabled ]] SEMREL_COMMIT_MESSAGE: $[[ inputs.commit-message ]] SEMREL_RELEASE_DISABLED: $[[ inputs.release-disabled ]] @@ -843,7 +847,7 @@ semantic-release: script: - configure_commit_signing - if [[ "$SEMREL_DRY_RUN" == "true" ]]; then dry_run_opt="--dry-run"; fi - - semantic-release ${TRACE:+--debug} --ci $dry_run_opt + - semantic-release ${TRACE:+--debug} --ci $dry_run_opt $SEMREL_EXTRA_ARGS dependencies: [] rules: - if: '$SEMREL_RELEASE_DISABLED == "true"'