Skip to content

Commit

Permalink
fix(ci): Fixed semver check in release-publish workflow (#388)
Browse files Browse the repository at this point in the history
Update release-publish.yml

Signed-off-by: Joel-David Wong <[email protected]>
  • Loading branch information
joeldavidw authored Oct 18, 2023
1 parent d9829e8 commit 49f4498
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49f4498

Please sign in to comment.