Skip to content

Commit f6223ab

Browse files
authored
Merge pull request #84 from nextcloud-libraries/feat/workflow-auto-update-npm-publish.yml
ci: update npm-publish.yml workflow from template
2 parents 10cb720 + 83480fd commit f6223ab

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ jobs:
3232
with:
3333
node-version-file: 'package.json'
3434

35+
- name: Check tag matches package.json
36+
run: |
37+
VERSION=$(node -p -e "require('./package.json').version")
38+
GH_VERSION=$(echo "$GH_VERSION" | sed s,\^v,,)
39+
if [ "$VERSION" != "$GH_VERSION" ]; then
40+
echo "$VERSION does not match $GH_VERSION"
41+
exit 1;
42+
fi;
43+
env:
44+
GH_VERSION: ${{ github.event.release.tag_name }}
45+
3546
- name: Install dependencies & build
3647
env:
3748
CYPRESS_INSTALL_BINARY: 0

0 commit comments

Comments
 (0)