mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 18:56:56 +00:00
docs(extra_plugins): must be in release config
Plugins passed in `extra_plugins` must be specified in the semantic release plugins array as well. https://semantic-release.gitbook.io/semantic-release/usage/configuration#plugins
This commit is contained in:
parent
16d8f3d61d
commit
8ac1950edb
1 changed files with 40 additions and 6 deletions
46
README.md
46
README.md
|
|
@ -28,7 +28,10 @@ GitHub Action for [Semantic Release](https://github.com/semantic-release/semanti
|
|||
* `new_release_minor_version`: Minor version of the new release
|
||||
* `new_release_patch_version`: Patch version of the new release
|
||||
|
||||
A simple example
|
||||
### Examples
|
||||
|
||||
#### A simple example
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -40,7 +43,8 @@ steps:
|
|||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
```
|
||||
|
||||
An advanced example
|
||||
#### Using `branch` and `semantic_version`
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -51,10 +55,6 @@ steps:
|
|||
with:
|
||||
branch: master
|
||||
semantic_version: 15.13.28
|
||||
# You can specify specifying version range for the extra plugins if you prefer.
|
||||
extra_plugins: |
|
||||
@semantic-release/git
|
||||
@semantic-release/changelog@3.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
|
@ -64,5 +64,39 @@ steps:
|
|||
run: ...
|
||||
```
|
||||
|
||||
#### Passing Extra Plugins with `extra_plugins`
|
||||
|
||||
The action can be used with `extra_plugins` option to specify plugins which are not in the [default list of plugins of semantic release](https://semantic-release.gitbook.io/semantic-release/usage/plugins#default-plugins). When using this option, please make sure that these plugins are also mentioned in your [semantic release config's plugins](https://semantic-release.gitbook.io/semantic-release/usage/configuration#plugins) array. For example, if you want to use `@semantic-release/git` and `@semantic-release/changelog` extra plugins, these must be added to `extra_plugins` in your actions file and `plugins` in your [release config file](https://semantic-release.gitbook.io/semantic-release/usage/configuration#configuration-file) as shown bellow:
|
||||
|
||||
_github-action_
|
||||
```yaml
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Semantic Release
|
||||
uses: cycjimmy/semantic-release-action@v2
|
||||
id: semantic # Need an `id` for output variables
|
||||
with:
|
||||
# You can specify specifying version range for the extra plugins if you prefer.
|
||||
extra_plugins: |
|
||||
@semantic-release/git
|
||||
@semantic-release/changelog@3.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
```
|
||||
|
||||
_release-config_
|
||||
|
||||
```diff
|
||||
plugins: [
|
||||
.
|
||||
.
|
||||
+ "@semantic-release/git",
|
||||
+ "@semantic-release/changelog"
|
||||
]
|
||||
```
|
||||
|
||||
|
||||
## [CHANGELOG](./docs/CHANGELOG.md)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue