From c1127051d40cafb9f4fe4b0f80db1e633763b3e7 Mon Sep 17 00:00:00 2001 From: Yidi Date: Thu, 26 Sep 2024 21:29:41 -0400 Subject: [PATCH] fix(release): correct output handling in release-on-tag workflow Improved the way outputs are managed in the 'check_release' step by returning values instead of direct assignments. This change ensures better handling of release existence checks and improves code readability. Added 'result-encoding' to specify string encoding for results. --- .github/workflows/release-on-tag.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml index 91306242..da5bcb32 100644 --- a/.github/workflows/release-on-tag.yml +++ b/.github/workflows/release-on-tag.yml @@ -21,14 +21,15 @@ jobs: repo: context.repo.repo, tag: context.ref.replace('refs/tags/', ''), }) - outputs.release_exists = 'true' + return { release_exists: 'true' } } catch (error) { if (error.status === 404) { - outputs.release_exists = 'false' + return { release_exists: 'false' } } else { throw error } } + result-encoding: string - name: Create Release if: steps.check_release.outputs.release_exists == 'false' @@ -41,4 +42,4 @@ jobs: draft: false prerelease: false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}