Merge pull request #220 from Pho3niX90/master
fallback to set-output on >> $GITHUB_OUTPUT failure
This commit is contained in:
commit
23be3d85c6
5
index.js
5
index.js
|
@ -222,7 +222,12 @@ const pkg = getPackageJson();
|
||||||
newVersion = `${tagPrefix}${newVersion}${tagSuffix}`;
|
newVersion = `${tagPrefix}${newVersion}${tagSuffix}`;
|
||||||
console.log(`newVersion after merging tagPrefix+newVersion+tagSuffix: ${newVersion}`);
|
console.log(`newVersion after merging tagPrefix+newVersion+tagSuffix: ${newVersion}`);
|
||||||
// Using sh as command instead of directly echo to be able to use file redirection
|
// Using sh as command instead of directly echo to be able to use file redirection
|
||||||
|
try {
|
||||||
await runInWorkspace('sh', ['-c', `echo "newTag=${newVersion}" >> $GITHUB_OUTPUT`]);
|
await runInWorkspace('sh', ['-c', `echo "newTag=${newVersion}" >> $GITHUB_OUTPUT`]);
|
||||||
|
} catch {
|
||||||
|
// for runner < 2.297.0
|
||||||
|
console.log(`::set-output name=newTag::${newVersion}`);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// to support "actions/checkout@v1"
|
// to support "actions/checkout@v1"
|
||||||
if (process.env['INPUT_SKIP-COMMIT'] !== 'true') {
|
if (process.env['INPUT_SKIP-COMMIT'] !== 'true') {
|
||||||
|
|
Loading…
Reference in New Issue