Skip to content

Commit

Permalink
fixinig precheck
Browse files Browse the repository at this point in the history
  • Loading branch information
sordina committed Oct 19, 2023
1 parent da2984c commit e9f379f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- run: |
PACKAGE_VERSION=`npm version | sed -rn "2 s/.*: '([^']*)'.*/\1/g; 2 p"`
echo '$GITHUB_REF' = "$GITHUB_REF"
echo '$PACKAGE_VERSION' = "$PACKAGE_VERSION"
if [ "$GITHUB_REF" = "v$PACKAGE_VERSION" ]
then
echo "Package version (v$PACKAGE_VERSION) must match tag (GITHUB_REF: $GITHUB_REF) in order to publish" 1>&2
exit 1
fi
- run: npm ci
- run: npm publish
Expand Down

0 comments on commit e9f379f

Please sign in to comment.