Skip to content
Snippets Groups Projects
Commit 090646b6 authored by Dom Does's avatar Dom Does Committed by Pierre Smeyers
Browse files

feat: add extra CLI options to be passed to semantic-release

parent 4559a8db
No related branches found
No related tags found
No related merge requests found
...@@ -91,6 +91,7 @@ As specified in the previous chapter, these variables are only used to generated ...@@ -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-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_ | | `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_ | | `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_ | | `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)$/` | | `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}` | | `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}` |
......
...@@ -78,6 +78,11 @@ ...@@ -78,6 +78,11 @@
"type": "boolean", "type": "boolean",
"advanced": true "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", "name": "SEMREL_AUTO_RELEASE_ENABLED",
"description": "When set the job start automatically. When not set (default), the job is manual.", "description": "When set the job start automatically. When not set (default), the job is manual.",
......
...@@ -55,6 +55,9 @@ spec: ...@@ -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. 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 type: boolean
default: false 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: auto-release-enabled:
description: When set the job start automatically. When not set (default), the job is manual. description: When set the job start automatically. When not set (default), the job is manual.
type: boolean type: boolean
...@@ -134,6 +137,7 @@ variables: ...@@ -134,6 +137,7 @@ variables:
SEMREL_CHANGELOG_FILE: $[[ inputs.changelog-file ]] SEMREL_CHANGELOG_FILE: $[[ inputs.changelog-file ]]
SEMREL_CHANGELOG_TITLE: $[[ inputs.changelog-title ]] SEMREL_CHANGELOG_TITLE: $[[ inputs.changelog-title ]]
SEMREL_DRY_RUN: $[[ inputs.dry-run ]] SEMREL_DRY_RUN: $[[ inputs.dry-run ]]
SEMREL_EXTRA_ARGS: $[[ inputs.extra-args ]]
SEMREL_AUTO_RELEASE_ENABLED: $[[ inputs.auto-release-enabled ]] SEMREL_AUTO_RELEASE_ENABLED: $[[ inputs.auto-release-enabled ]]
SEMREL_COMMIT_MESSAGE: $[[ inputs.commit-message ]] SEMREL_COMMIT_MESSAGE: $[[ inputs.commit-message ]]
SEMREL_RELEASE_DISABLED: $[[ inputs.release-disabled ]] SEMREL_RELEASE_DISABLED: $[[ inputs.release-disabled ]]
...@@ -843,7 +847,7 @@ semantic-release: ...@@ -843,7 +847,7 @@ semantic-release:
script: script:
- configure_commit_signing - configure_commit_signing
- if [[ "$SEMREL_DRY_RUN" == "true" ]]; then dry_run_opt="--dry-run"; fi - 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: [] dependencies: []
rules: rules:
- if: '$SEMREL_RELEASE_DISABLED == "true"' - if: '$SEMREL_RELEASE_DISABLED == "true"'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment