File tree 5 files changed +12
-2
lines changed
5 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -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) |
Original file line number Diff line number Diff line change @@ -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'
Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ exports.handleRepositoryUrlOption = () => {
126
126
core . debug ( `repository_url input: ${ repositoryUrl } ` ) ;
127
127
128
128
if ( repositoryUrl ) {
129
- return { r : repositoryUrl } ;
129
+ return { r : repositoryUrl } ;
130
130
} else {
131
131
return { } ;
132
132
}
133
- } ;
133
+ } ;
Original file line number Diff line number Diff line change @@ -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 ( ) ,
Original file line number Diff line number Diff line change 5
5
"extra_plugins" : " extra_plugins" ,
6
6
"dry_run" : " dry_run" ,
7
7
"ci" : " ci" ,
8
+ "unset_gha_env" : " unset_gha_env" ,
8
9
"extends" : " extends" ,
9
10
"working_directory" : " working_directory" ,
10
11
"tag_format" : " tag_format" ,
You can’t perform that action at this time.
0 commit comments