18
18
strategy :
19
19
fail-fast : false
20
20
matrix :
21
- node-version : [14 .x]
21
+ node-version : [16 .x]
22
22
23
23
steps :
24
24
# Setup
27
27
- name : Setup Node ${{ matrix.node_version }}
28
28
uses : actions/setup-node@v1
29
29
with :
30
- node-version : 14
30
+ node-version : 16
31
31
registry-url : ' https://registry.npmjs.org'
32
32
- name : Git Identity
33
33
run : |
@@ -77,15 +77,22 @@ jobs:
77
77
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78
78
79
79
# Bootstrap project
80
+ - name : Cache pnpm modules
81
+ uses : actions/cache@v3
82
+ with :
83
+ path : ~/.pnpm-store
84
+ key : ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
85
+ restore-keys : |
86
+ ${{ runner.os }}-
80
87
- name : install
81
- if : startsWith( env.commitmsg , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false'
82
- run : yarn
83
- - name : bootstrap
84
- if : startsWith( env.commitmsg , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false'
85
- run : yarn run bootstrap
88
+
89
+ with :
90
+ version : 8
91
+ run_install : |
92
+ - recursive: true
93
+ args: [--frozen-lockfile]
86
94
- name : build
87
- if : startsWith( env.commitmsg , 'chore(release):' ) && steps.tag_check.outputs.exists_tag == 'false'
88
- run : yarn build
95
+ run : pnpm build
89
96
90
97
# Git stash
91
98
- name : Drop current changes
@@ -106,9 +113,13 @@ jobs:
106
113
git_tag_prefix : " v"
107
114
108
115
# Publish
109
- - name : npm publish
110
- if : steps.tag_check.outputs.exists_tag == 'false' && startsWith( env.commitmsg , 'chore(release):' )
111
- run : yarn lerna publish from-package --yes
116
+ - name : Publish
117
+ run : |
118
+ if [ '${{ github.event_name }}' == 'pull_request' ] ; then
119
+ pnpm publish --registry=https://registry.npmjs.org/ --publish-branch=${{ github.ref }} -r
120
+ elif [ '${{ github.event_name }}' == 'push' ] ; then
121
+ pnpm publish --registry=https://registry.npmjs.org/ --publish-branch=${{ github.ref_name }} -r ${{ env.PUBLISH_PARAMS }}
122
+ fi
112
123
env :
113
124
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
114
125
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments