11
0
Fork 0
mirror of https://github.com/cycjimmy/semantic-release-action.git synced 2026-04-24 12:24:43 +00:00

Merge pull request #153 from 1nVitr0/main

feat: add `ci` input parameter
This commit is contained in:
Geoffrey.C 2023-03-15 10:49:09 +08:00 committed by GitHub
commit 039e6080a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 0 deletions

View file

@ -50,6 +50,7 @@ then make sure that you configure this in your `package.json` file:
| branch | false | The branch on which releases should happen.[[Details](#branch)]<br>Only support for **semantic-release older than v16**. |
| extra_plugins | false | Extra plugins for pre-install. [[Details](#extra_plugins)] |
| dry_run | false | Whether to run semantic release in `dry-run` mode. [[Details](#dry_run)] |
| ci | false | Whether to run semantic release with CI support. [[Details](#ci)]<br>Support for **semantic-release above v16**. |
| extends | false | Use a sharable configuration [[Details](#extends)] |
| working_directory | false | Use another working directory for semantic release [[Details](#working_directory)] |
| tag_format | false | Specify format of tag (useful for monorepos) |
@ -193,6 +194,24 @@ steps:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
```
#### ci
> {Optional Input Parameter} Whether to run semantic release with CI support (default true).<br>`ci` supports for **semantic-release above v16**.
```yaml
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
with:
ci: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
```
`ci` can be used, e.g in combination with `dry_run` when generating the next release version in pull requests, where `semantic_release` would normally block the execution.
#### extends
The action can be used with `extends` option to extend an existing [sharable configuration](https://semantic-release.gitbook.io/semantic-release/usage/shareable-configurations) of semantic-release. Can be used in combination with `extra_plugins`.