@@ -11,13 +11,16 @@ jobs:
1111 name : Check if package version has been upgraded
1212 runs-on : ubuntu-latest
1313 outputs :
14- version : ${{ steps.version-updated.outputs.current-package- version }}
15- has_updated : ${{ steps.version-updated.outputs.has- updated }}
14+ version : ${{ steps.version-updated.outputs.current-version }}
15+ has_updated : ${{ steps.version-updated.outputs.current-version != steps.version- updated.outputs.previous-version }}
1616 steps :
17- - uses : JiPaix/package-json-updated-action@v1.0.5
17+ - uses : actions/checkout@v2
18+ with :
19+ fetch-depth : 2
20+ - uses : salsify/action-detect-and-tag-new-version@v2
1821 id : version-updated
19- env :
20- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
22+ with :
23+ create-tag : false
2124 publish-docs :
2225 name : Publish Docs
2326 runs-on : ubuntu-latest
@@ -33,11 +36,11 @@ jobs:
3336 registry-url : " https://registry.npmjs.org"
3437 - uses : pnpm/action-setup@v2
3538 with :
36- version : 8
39+ version : 9
3740 run_install : false
3841 - uses : actions/checkout@v3
3942 with :
40- fetch-depth : 0
43+ fetch-depth : 2
4144 ref : ${{ github.ref }}
4245 - name : Install and Build
4346 run : |
@@ -92,13 +95,13 @@ jobs:
9295 fi
9396 git config user.name github-actions
9497 git config user.email github-actions@github.com
95- echo //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} > .npmrc
9698 EXTRA_ARGS=""
9799 if [[ $VERSION == *"alpha."* ]] || [[ $VERSION == *"beta."* ]] || [[ $VERSION == *"rc."* ]]; then
98100 echo "Is pre-release version"
99101 EXTRA_ARGS="$EXTRA_ARGS --dist-tag next"
100102 fi
101- npx lerna publish ${VERSION} --yes --force-publish $EXTRA_ARGS
103+ echo //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} > .npmrc
104+ pnpm exec lerna publish ${VERSION} --yes --force-publish $EXTRA_ARGS
102105 env :
103106 VERSION : ${{ needs.check_if_version_upgraded.outputs.version }}
104107 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments