add tag package json validation

This commit is contained in:
Brian Ignacio 2022-11-29 19:03:27 +08:00
parent 102cf61030
commit 88c866b727

View File

@ -20,9 +20,11 @@ jobs:
run: npm run test run: npm run test
- name: Package module - name: Package module
run: npm pack run: npm pack
- name: Determine version - name: Verify tag version is the same as package.json version
id: version id: version
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT run: |
[ ${GITHUB_REF:11} = $(node -p "require('./package.json').version") ]
echo "version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
- name: Upload npm package file - name: Upload npm package file
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with: