Skip to content

Commit

Permalink
fix(ci): More validation of git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy committed Oct 1, 2024
1 parent 60b8480 commit e7387e9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e7387e9

Please sign in to comment.