feat: add working dir

This commit is contained in:
Thomas GRUSON 2021-12-09 16:10:37 +01:00
parent d9c764f106
commit 71260837fb
No known key found for this signature in database
GPG key ID: DB643CF86A433917
4 changed files with 34 additions and 9 deletions

View file

@ -43,14 +43,15 @@ then make sure that you configure this in your `package.json` file:
```
### Inputs
| Input Parameter | Required | Description |
|:----------------:|:--------:|-------------|
| semantic_version | false | Specify specifying version range for semantic-release. [[Details](#semantic_version)] |
| branches | false | The branches on which releases should happen.[[Details](#branches)]<br>Support for **semantic-release above v16**. |
| 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)] |
| extends | false | Use a sharable configuration [[Details](#extends)] |
| Input Parameter | Required | Description |
|:-----------------:|:--------:|-------------|
| semantic_version | false | Specify specifying version range for semantic-release. [[Details](#semantic_version)] |
| branches | false | The branches on which releases should happen.[[Details](#branches)]<br>Support for **semantic-release above v16**. |
| 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)] |
| extends | false | Use a sharable configuration [[Details](#extends)] |
| working_directory | false | Use another working directory for semantic release [[Details](#working_directory)] |
#### semantic_version
> {Optional Input Parameter} Specify specifying version range for semantic-release.<br>If no version range is specified, latest version will be used by default.
@ -206,6 +207,23 @@ steps:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
```
#### working_directory
This action run semantic release in the github provided workspace by default. You can override it by setting another working directory.
```yaml
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
# You can select another working directory like a subdirectory for example.
working_directory: ./code
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
```
### Outputs
| Output Parameter | Description |
|:-------------------------:|---|