@@ -21,61 +21,60 @@ 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 }}
26- uses : actions/setup-node@v3
28+ uses : actions/setup-node@v4
2729 with :
2830 node-version : ${{ matrix.node-version }}
29- cache : ' npm '
31+ cache : ' pnpm '
3032
31- - run : npm install
33+ - run : pnpm install
3234
33- - run : npm run lint:js
35+ - run : pnpm run lint:js
3436
35- - run : npm run test -- --runInBand
37+ - run : pnpm run test --runInBand
38+
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
4549 strategy :
4650 matrix :
47- node-version : [ 16 .x ]
51+ node-version : [ 18 .x ]
4852 steps :
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
53- uses : actions/setup-node@v3
60+ uses : actions/setup-node@v4
5461 with :
55- node-version : 16 .x
56- - name : npm install, build,
62+ node-version : 18 .x
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
61- version=$(cat package.json | jq -r '.version')
62- git fetch --unshallow
63- git fetch --all --tags
64- TAG=v$version
67+ pnpm install
6568 env :
6669 CI : true
6770 DEPLOY_KEY : ${{ secrets.DEPLOY_KEY }}
68- - name : deploy npm
71+ - name : deploy pnpm
6972 if : github.ref == 'refs/heads/main'
7073 run : |
7174 version=$(cat package.json | jq -r '.version')
7275 TAG=v$version
73- if git rev-parse "$TAG" >/dev/null 2>&1; then
74- echo "tag exists";
75- else
76- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
77- npm publish || echo "already published"
78- fi
76+ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
77+ pnpm publish || echo "already published"
7978 env :
8079 NPM_TOKEN : " ${{ secrets.NPM_TOKEN }}"
8180 - name : create tag
@@ -88,10 +87,12 @@ jobs:
8887 set -e
8988 version=$(cat package.json | jq -r '.version')
9089 TAG=v$version
90+ git fetch --unshallow
91+ git fetch --all --tags
9192 if git rev-parse "$TAG" >/dev/null 2>&1; then
9293 echo "tag exists";
9394 else
94- npm i -g lerna-changelog
95+ pnpm i -g lerna-changelog
9596 export GITHUB_AUTH=$GITHUB_TOKEN
9697 export changelog=$(lerna-changelog --next-version=$version)
9798 echo -e "# Changelog\n\n$changelog\n$(tail --lines=+2 CHANGELOG.md)" > CHANGELOG.md
0 commit comments