|
@@ -138,7 +138,6 @@ jobs:
|
|
|
|
|
|
publish:
|
|
|
name: Publish
|
|
|
- if: "startsWith(github.event.head_commit.message, 'chore(release): publish')"
|
|
|
runs-on: ubuntu-latest
|
|
|
needs: test_binding
|
|
|
|
|
@@ -169,15 +168,16 @@ jobs:
|
|
|
run: ls -R .
|
|
|
shell: bash
|
|
|
|
|
|
- - name: Upload artifacts to Github release
|
|
|
+ - name: Publish
|
|
|
run: |
|
|
|
- node ./upload-to-release.js
|
|
|
+ if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
|
|
|
+ then
|
|
|
+ node ./upload-to-release.js
|
|
|
+ echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
|
|
+ npm publish
|
|
|
+ else
|
|
|
+ echo "Not a release, skipping publish"
|
|
|
+ fi
|
|
|
env:
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
-
|
|
|
- - name: Lerna publish
|
|
|
- run: |
|
|
|
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
|
|
- npm publish
|
|
|
- env:
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|