Skip to content

Commit 6020404

Browse files
committed
update workflow;
1 parent 747ed66 commit 6020404

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/npm-build-publish.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,13 @@ jobs:
4343
id: package_version
4444
run: echo "::set-output name=VERSION::$(node -p "require('./package.json').version")"
4545

46-
- name: Check npm view
47-
run: |
48-
VERSION=${{ steps.package_version.outputs.VERSION }}
49-
echo "Checking version $VERSION"
50-
npm view epsillajs@$VERSION
51-
5246
- name: Check if version already published
5347
run: |
5448
VERSION=${{ steps.package_version.outputs.VERSION }}
55-
if npm view epsillajs@$VERSION; then
49+
echo "Checking version: $VERSION"
50+
NPM_VIEW_OUTPUT=$(npm view epsillajs@$VERSION)
51+
echo "npm view output: $NPM_VIEW_OUTPUT"
52+
if [ -n "$NPM_VIEW_OUTPUT" ]; then
5653
echo "Version $VERSION already exists on npm. Please update the version."
5754
exit 1
5855
fi

0 commit comments

Comments
 (0)