From 7a1b2d75ba902d142ff8cf3d3f019669dfe87f8f Mon Sep 17 00:00:00 2001 From: Fuxing Loh Date: Sat, 11 Nov 2023 12:54:19 +0800 Subject: [PATCH] chore(workflows): fix edge case in release.yml --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d06c6f2c..fbec887b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,8 @@ jobs: uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: script: | - const semver = context.ref.replace('refs/tags/v', '') + const tag = "${{ github.event.release.tag_name }}"; + const semver = tag.replace('v', ''); if (semver.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) { return semver }