From b990f39960acfd9da51bc035562861dc4e0e3726 Mon Sep 17 00:00:00 2001 From: Pho3niX90 Date: Wed, 28 Jun 2023 19:18:03 +0200 Subject: [PATCH] Update index.js --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index d4877eb..8c02fff 100644 --- a/index.js +++ b/index.js @@ -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') {