File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ const git = simpleGit(root);
29
29
const baseRef = process . env . GITHUB_PULL_REQUEST_BASE_SHA || 'master' ;
30
30
const headRef = process . env . GITHUB_PULL_REQUEST_HEAD_SHA || 'HEAD' ;
31
31
32
+ const githubOutputFile = ( function ( ) : string {
33
+ const value = process . env . GITHUB_OUTPUT ;
34
+ if ( ! value ) {
35
+ throw new Error ( 'GITHUB_OUTPUT environment variable must be set' ) ;
36
+ }
37
+ return value ;
38
+ } ) ( ) ;
39
+
32
40
// Version bump text converted to rankable numbers.
33
41
const bumpRank : Record < string , number > = {
34
42
'patch' : 0 ,
@@ -208,7 +216,7 @@ async function main() {
208
216
*/
209
217
if ( errors . length > 0 ) {
210
218
await writeFile (
211
- process . env . GITHUB_OUTPUT ,
219
+ githubOutputFile ,
212
220
`CHANGESET_ERROR_MESSAGE=${ errors . join ( '%0A' ) } \n` ,
213
221
{ flag : 'a' }
214
222
) ;
You can’t perform that action at this time.
0 commit comments