Skip to content

Commit

Permalink
Merge pull request #220 from Pho3niX90/master
Browse files Browse the repository at this point in the history
fallback to set-output on >> $GITHUB_OUTPUT failure
  • Loading branch information
phips28 authored Jun 28, 2023
2 parents 0a5ec79 + b990f39 commit 23be3d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,12 @@ const pkg = getPackageJson();
newVersion = `${tagPrefix}${newVersion}${tagSuffix}`;
console.log(`newVersion after merging tagPrefix+newVersion+tagSuffix: ${newVersion}`);
// Using sh as command instead of directly echo to be able to use file redirection
await runInWorkspace('sh', ['-c', `echo "newTag=${newVersion}" >> $GITHUB_OUTPUT`]);
try {
await runInWorkspace('sh', ['-c', `echo "newTag=${newVersion}" >> $GITHUB_OUTPUT`]);
} catch {
// for runner < 2.297.0
console.log(`::set-output name=newTag::${newVersion}`);
}
try {
// to support "actions/checkout@v1"
if (process.env['INPUT_SKIP-COMMIT'] !== 'true') {
Expand Down

0 comments on commit 23be3d8

Please sign in to comment.