Skip to content
Snippets Groups Projects
Commit 49426600 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'feature/extra-arguments' into 'master'

Allow additional args to be passed to semrel

See merge request to-be-continuous/semantic-release!68
parents 4559a8db 090646b6
Branches
Tags
No related merge requests found
......@@ -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}` |
......
......@@ -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.",
......
......@@ -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"'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment