From e7387e9ca06219b63653b78bfc2904705b2a2121 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Tue, 1 Oct 2024 17:42:00 -0400 Subject: [PATCH] fix(ci): More validation of git tag --- .github/workflows/release.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3126b4..a0df2fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,13 +44,8 @@ jobs: with: result-encoding: string script: | - console.log(`Ref tag: ${context.ref}`) - const refTagMatch = context.ref.match(/(alpha|beta)/) - if (!refTagMatch) { - distTag = 'latest' - } else { - distTag = refTagMatch[0] - } + console.log(`git tag: ${steps.version.outputs.tag}`) + const distTag = steps.version.outputs.tag.match(/^v\d+\.\d+\.\d+$/) ? 'latest' : 'alpha' console.log(`npm dist tag: ${distTag}`) return distTag