@cycjimmy/semantic-release-action 4.1.1 → 4.2.1
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/LICENSE +1 -1
- package/README.md +24 -0
- package/action.yml +3 -0
- package/docs/CHANGELOG.md +14 -0
- package/package.json +2 -2
- package/src/handleOptions.js +2 -2
- package/src/index.js +5 -0
- package/src/inputs.json +1 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -51,6 +51,7 @@ then make sure that you configure this in your `package.json` file:
|
|
|
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
53
|
| ci | false | Whether to run semantic release with CI support. [[Details](#ci)]<br>Support for **semantic-release above v16**. |
|
|
54
|
+
| unset_gha_env | false | Whether to unset the GITHUB_ACTIONS environment variable. |
|
|
54
55
|
| extends | false | Use a sharable configuration [[Details](#extends)] |
|
|
55
56
|
| working_directory | false | Use another working directory for semantic release [[Details](#working_directory)] |
|
|
56
57
|
| tag_format | false | Specify format of tag (useful for monorepos) |
|
|
@@ -264,6 +265,29 @@ steps:
|
|
|
264
265
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
265
266
|
```
|
|
266
267
|
|
|
268
|
+
#### unset_gha_env
|
|
269
|
+
Setting this to true will unset the `GITHUB_ACTIONS` environment variable. This can be useful when wanting to validate things such as merging of a PR would create a valid release.
|
|
270
|
+
|
|
271
|
+
```yaml
|
|
272
|
+
steps:
|
|
273
|
+
- name: Checkout
|
|
274
|
+
uses: actions/checkout@v4
|
|
275
|
+
- name: Temporarily merge PR branch
|
|
276
|
+
if: ${{ github.event_name == 'pull_request' }}
|
|
277
|
+
run: |
|
|
278
|
+
git config --global user.name github-actions
|
|
279
|
+
git config --global user.email github-actions@github.com
|
|
280
|
+
git merge --no-ff origin/${{ github.event.pull_request.head.ref }} --message "${{ github.event.pull_request.title }}"
|
|
281
|
+
- name: Semantic Release
|
|
282
|
+
uses: cycjimmy/semantic-release-action@v4
|
|
283
|
+
with:
|
|
284
|
+
unset_gha_env: ${{ github.event_name == 'pull_request' }}
|
|
285
|
+
ci: ${{ github.event_name == 'pull_request' && false || '' }}
|
|
286
|
+
env:
|
|
287
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
288
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
289
|
+
```
|
|
290
|
+
|
|
267
291
|
### Outputs
|
|
268
292
|
| Output Parameter | Description |
|
|
269
293
|
|:-------------------------:|-----------------------------------------------------------------------------------------------------------------------------------|
|
package/action.yml
CHANGED
|
@@ -23,6 +23,9 @@ inputs:
|
|
|
23
23
|
ci:
|
|
24
24
|
required: false
|
|
25
25
|
description: 'Whether to run semantic release with CI support (default: true). It will override the ci attribute in your configuration file'
|
|
26
|
+
unset_gha_env:
|
|
27
|
+
required: false
|
|
28
|
+
description: 'Whether to unset the GITHUB_ACTIONS environment variable. This can be useful when trying to run semantic-release as part of PR checks.'
|
|
26
29
|
extends:
|
|
27
30
|
required: false
|
|
28
31
|
description: 'One or several sharable configurations, https://semantic-release.gitbook.io/semantic-release/usage/configuration#extends'
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [4.2.1](https://github.com/cycjimmy/semantic-release-action/compare/v4.2.0...v4.2.1) (2025-06-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update marked terminal to v7.3.0 ([b52fa1b](https://github.com/cycjimmy/semantic-release-action/commit/b52fa1bae5b892a36c1e01fab61457344cc0c494))
|
|
7
|
+
|
|
8
|
+
# [4.2.0](https://github.com/cycjimmy/semantic-release-action/compare/v4.1.1...v4.2.0) (2025-03-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add ability to unset GITHUB_ACTION env var ([266ea7e](https://github.com/cycjimmy/semantic-release-action/commit/266ea7eb8c90943aa9cddd3b0ed326d5e8784a26))
|
|
14
|
+
|
|
1
15
|
## [4.1.1](https://github.com/cycjimmy/semantic-release-action/compare/v4.1.0...v4.1.1) (2024-09-25)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cycjimmy/semantic-release-action",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "GitHub Action for Semantic Release",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"@cycjimmy/awesome-js-funcs": "^4.0.9",
|
|
26
26
|
"@semantic-release/changelog": "^6.0.3",
|
|
27
27
|
"@semantic-release/git": "^10.0.1",
|
|
28
|
-
"semantic-release": "^24.
|
|
28
|
+
"semantic-release": "^24.2.5"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/handleOptions.js
CHANGED
package/src/index.js
CHANGED
|
@@ -27,6 +27,11 @@ const release = async () => {
|
|
|
27
27
|
await preInstall(core.getInput(inputs.extra_plugins));
|
|
28
28
|
await preInstall(core.getInput(inputs.extends));
|
|
29
29
|
|
|
30
|
+
if (core.getInput(inputs.unset_gha_env) === 'true') {
|
|
31
|
+
core.debug('Unset GITHUB_ACTIONS environment variable');
|
|
32
|
+
delete process.env.GITHUB_ACTIONS;
|
|
33
|
+
}
|
|
34
|
+
|
|
30
35
|
const semanticRelease = await import('semantic-release');
|
|
31
36
|
const result = await semanticRelease.default({
|
|
32
37
|
...handleBranchesOption(),
|