@cycjimmy/semantic-release-action 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/action.yml +3 -0
- package/docs/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/handleOptions.js +19 -0
- package/src/index.js +2 -0
- package/src/inputs.json +1 -0
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ then make sure that you configure this in your `package.json` file:
|
|
|
50
50
|
| branch | false | The branch on which releases should happen.[[Details](#branch)]<br>Only support for **semantic-release older than v16**. |
|
|
51
51
|
| extra_plugins | false | Extra plugins for pre-install. [[Details](#extra_plugins)] |
|
|
52
52
|
| dry_run | false | Whether to run semantic release in `dry-run` mode. [[Details](#dry_run)] |
|
|
53
|
+
| ci | false | Whether to run semantic release with CI support. [[Details](#ci)]<br>Support for **semantic-release above v16**. |
|
|
53
54
|
| extends | false | Use a sharable configuration [[Details](#extends)] |
|
|
54
55
|
| working_directory | false | Use another working directory for semantic release [[Details](#working_directory)] |
|
|
55
56
|
| tag_format | false | Specify format of tag (useful for monorepos) |
|
|
@@ -193,6 +194,24 @@ steps:
|
|
|
193
194
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
194
195
|
```
|
|
195
196
|
|
|
197
|
+
#### ci
|
|
198
|
+
> {Optional Input Parameter} Whether to run semantic release with CI support (default true).<br>`ci` supports for **semantic-release above v16**.
|
|
199
|
+
|
|
200
|
+
```yaml
|
|
201
|
+
steps:
|
|
202
|
+
- name: Checkout
|
|
203
|
+
uses: actions/checkout@v3
|
|
204
|
+
- name: Semantic Release
|
|
205
|
+
uses: cycjimmy/semantic-release-action@v3
|
|
206
|
+
with:
|
|
207
|
+
ci: false
|
|
208
|
+
env:
|
|
209
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
210
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
`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.
|
|
214
|
+
|
|
196
215
|
#### extends
|
|
197
216
|
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`.
|
|
198
217
|
|
package/action.yml
CHANGED
|
@@ -20,6 +20,9 @@ inputs:
|
|
|
20
20
|
dry_run:
|
|
21
21
|
required: false
|
|
22
22
|
description: 'Whether to run semantic release in `dry-run` mode. It will override the dryRun attribute in your configuration file'
|
|
23
|
+
ci:
|
|
24
|
+
required: false
|
|
25
|
+
description: 'Whether to run semantic release with CI support (default: true). It will override the ci attribute in your configuration file'
|
|
23
26
|
extends:
|
|
24
27
|
required: false
|
|
25
28
|
description: 'One or several sharable configurations, https://semantic-release.gitbook.io/semantic-release/usage/configuration#extends'
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.4.0](https://github.com/cycjimmy/semantic-release-action/compare/v3.3.0...v3.4.0) (2023-03-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add `ci` input parameter ([b356b18](https://github.com/cycjimmy/semantic-release-action/commit/b356b18b5f474bb4b9fe4bb5801b364ce24aa8f6))
|
|
7
|
+
|
|
1
8
|
# [3.3.0](https://github.com/cycjimmy/semantic-release-action/compare/v3.2.0...v3.3.0) (2023-03-07)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/handleOptions.js
CHANGED
|
@@ -60,6 +60,25 @@ exports.handleDryRunOption = () => {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Handle Ci Option
|
|
65
|
+
* @returns {{}|{ci: boolean}}
|
|
66
|
+
*/
|
|
67
|
+
exports.handleCiOption = () => {
|
|
68
|
+
const ci = core.getInput(inputs.ci);
|
|
69
|
+
|
|
70
|
+
switch (ci) {
|
|
71
|
+
case 'true':
|
|
72
|
+
return { ci: true, noCi: false };
|
|
73
|
+
|
|
74
|
+
case 'false':
|
|
75
|
+
return { ci: false, noCi: true };
|
|
76
|
+
|
|
77
|
+
default:
|
|
78
|
+
return {};
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
63
82
|
/**
|
|
64
83
|
* Handle Extends Option
|
|
65
84
|
* @returns {{}|{extends: Array}|{extends: String}}
|
package/src/index.js
CHANGED
|
@@ -2,6 +2,7 @@ const core = require('@actions/core');
|
|
|
2
2
|
const {
|
|
3
3
|
handleBranchesOption,
|
|
4
4
|
handleDryRunOption,
|
|
5
|
+
handleCiOption,
|
|
5
6
|
handleExtends,
|
|
6
7
|
handleTagFormat,
|
|
7
8
|
} = require('./handleOptions');
|
|
@@ -29,6 +30,7 @@ const release = async () => {
|
|
|
29
30
|
const result = await semanticRelease({
|
|
30
31
|
...handleBranchesOption(),
|
|
31
32
|
...handleDryRunOption(),
|
|
33
|
+
...handleCiOption(),
|
|
32
34
|
...handleExtends(),
|
|
33
35
|
...handleTagFormat()
|
|
34
36
|
});
|