From 49f44982bbdf85828af4c043872ac081ae169f30 Mon Sep 17 00:00:00 2001 From: Joel-David Wong <4586209+joeldavidw@users.noreply.github.com> Date: Thu, 19 Oct 2023 02:04:35 +0800 Subject: [PATCH] fix(ci): Fixed semver check in `release-publish` workflow (#388) Update release-publish.yml Signed-off-by: Joel-David Wong <4586209+joeldavidw@users.noreply.github.com> --- .github/workflows/release-publish.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index d624a93..e2d9e48 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -20,12 +20,13 @@ jobs: id: version 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 } - throw new Error('not semver') + throw new Error('Invalid tag: ' + tag); result-encoding: string - run: npm ci