@@ -21,24 +21,28 @@ jobs:
2121
2222 steps :
2323 - uses : actions/checkout@v4
24-
24+ - uses : pnpm/action-setup@v4
25+ with :
26+ version : ' latest'
2527 - name : Use Node.js ${{ matrix.node-version }}
2628 uses : actions/setup-node@v4
2729 with :
2830 node-version : ${{ matrix.node-version }}
29- cache : ' npm'
31+ cache : ' pnpm'
32+
33+ - run : pnpm install
3034
31- - run : npm install
35+ - run : pnpm run lint:js
3236
33- - run : npm run lint:js
37+ - run : pnpm run test --runInBand
3438
35- - run : npm run test -- --runInBand
39+ - run : pnpm --filter '*' test
3640
3741 deploy :
3842 permissions :
3943 contents : write
4044 deployments : write
41-
45+
4246 needs : [ test ]
4347 if : github.ref == 'refs/heads/main'
4448 runs-on : ubuntu-latest
@@ -49,23 +53,26 @@ jobs:
4953 - uses : actions/checkout@v4
5054 with :
5155 token : ${{ secrets.GITHUB_TOKEN }}
56+ - uses : pnpm/action-setup@v4
57+ with :
58+ version : ' latest'
5259 - name : Use Node.js
5360 uses : actions/setup-node@v4
5461 with :
5562 node-version : 16.x
56- - name : npm install, build,
63+ - name : pnpm install, build,
5764 run : |
5865 mkdir ~/.ssh
5966 ssh-keyscan github.com >> ~/.ssh/known_hosts
60- npm install --no-audit --legacy-peer-deps
67+ pnpm install --no-audit --legacy-peer-deps
6168 version=$(cat package.json | jq -r '.version')
6269 git fetch --unshallow
6370 git fetch --all --tags
6471 TAG=v$version
6572 env :
6673 CI : true
6774 DEPLOY_KEY : ${{ secrets.DEPLOY_KEY }}
68- - name : deploy npm
75+ - name : deploy pnpm
6976 if : github.ref == 'refs/heads/main'
7077 run : |
7178 version=$(cat package.json | jq -r '.version')
7481 echo "tag exists";
7582 else
7683 echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
77- npm publish || echo "already published"
84+ pnpm publish || echo "already published"
7885 fi
7986 env :
8087 NPM_TOKEN : " ${{ secrets.NPM_TOKEN }}"
9198 if git rev-parse "$TAG" >/dev/null 2>&1; then
9299 echo "tag exists";
93100 else
94- npm i -g lerna-changelog
101+ pnpm i -g lerna-changelog
95102 export GITHUB_AUTH=$GITHUB_TOKEN
96103 export changelog=$(lerna-changelog --next-version=$version)
97104 echo -e "# Changelog\n\n$changelog\n$(tail --lines=+2 CHANGELOG.md)" > CHANGELOG.md
0 commit comments