提交 4a84fa6a 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

add check for skipping exist version when publishing to NPM

上级 cdda8c35
......@@ -63,7 +63,12 @@ jobs:
fi # See: https://stackoverflow.com/a/58869470/1123955
- name: Is A Publish Branch
if: steps.check-branch.outputs.match == 'true'
run: npm publish
run: |
VERSION=$(npx pkg-jq -r .version package.json)
if npx version-exists @chatie/grpc "$VERSION"
then "Version $VERSION exists on NPM, skipped."
else npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Is Not A Publish Branch
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册