File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 11name : Publish to npm
22on :
3- push :
4- tags :
5- - v[0-9].[0-9]+.[0-9]+
3+ release :
4+ types : [published]
65jobs :
76 publish :
87 runs-on : ubuntu-latest
@@ -13,12 +12,14 @@ jobs:
1312 node-version : 12
1413 - name : Check tag version
1514 run : |
15+ TAG_NAME=${{ github.event.release.tag_name }}
1616 VERSION=$(node -e 'console.info(require("./package.json").version)')
17- if [ "refs/tags/ v${VERSION}" != $GITHUB_REF ]; then
18- echo "Ref ${GITHUB_REF } not match"
17+ if [ "v${VERSION}" != $TAG_NAME ]; then
18+ echo "Ref ${TAG_NAME } not match with v${VERSION} "
1919 exit 1
2020 fi
2121 - run : npm install
22- - run : npm publish
23- env :
24- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
22+ - name : publish
23+ run : |
24+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
25+ npm publish
Original file line number Diff line number Diff line change 11name : Run tests
2- on : [push, pull_request]
2+ on :
3+ push :
4+ branches :
5+ - ' *'
6+ pull_request :
7+ branches :
8+ - ' *'
39jobs :
410 test :
511 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments