From 78bff5adc55e3eeaa458b6fb20c43aa1cd1aebb0 Mon Sep 17 00:00:00 2001 From: Yidi Date: Thu, 26 Sep 2024 21:25:56 -0400 Subject: [PATCH] fix(workflow): correct output setting in release-on-tag workflow Refactored how the release_exists output is set to be compatible with GitHub Actions syntax. This ensures the workflow reliably detects if a release already exists, improving the robustness of the release process. --- .github/workflows/release-on-tag.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml index 7797d666..91306242 100644 --- a/.github/workflows/release-on-tag.yml +++ b/.github/workflows/release-on-tag.yml @@ -21,15 +21,14 @@ jobs: repo: context.repo.repo, tag: context.ref.replace('refs/tags/', ''), }) - return { release_exists: 'true' } + outputs.release_exists = 'true' } catch (error) { if (error.status === 404) { - return { release_exists: 'false' } + outputs.release_exists = 'false' } else { throw error } } - outputs: release_exists - name: Create Release if: steps.check_release.outputs.release_exists == 'false' @@ -42,4 +41,4 @@ jobs: draft: false prerelease: false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file