File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 push :
99 branches :
1010 - master
11- pull_request : {}
11+ pull_request : { }
1212 release :
13- types : [created]
13+ types : [ created ]
1414jobs :
1515
1616 build :
1717 runs-on : ubuntu-latest
1818 steps :
19- - uses : actions/checkout@v2
20- - name : Use Node.js
21- uses : actions/setup-node@v2
19+ - name : ⬇️ Checkout source
20+ uses : actions/checkout@v4
21+ - name : 🚛 Install pnpm
22+ uses : pnpm/action-setup@v4
23+ - name : 🏛️ Setup Node.js
24+ uses : actions/setup-node@v4
2225 with :
23- node-version : 17.x
24- - run : npm ci
25- - run : npm run build
26- - run : npm run lint
27- - run : npm test
28- - uses : actions/upload-artifact@v2
29- with :
30- name : build-artifacts
31- path : |
32- coverage/
33- dist/
34- .npmignore
35- package.json
36- package-lock.json
37- LICENSE
38- README.md
39-
40- coverage :
41- needs : build
42- runs-on : ubuntu-latest
43- steps :
44- - if : success()
45- uses : actions/download-artifact@v2
46- id : download
47- with :
48- name : build-artifacts
49- - uses : coverallsapp/github-action@1.1.3
26+ node-version-file : ' .nvmrc'
27+ cache : ' pnpm'
28+ - name : 📦 Install Dependencies
29+ run : pnpm i
30+ - name : 🏗 Build
31+ run : pnpm run build
32+ - name : 👕 Lint
33+ run : pnpm run lint
34+ - name : 🧪 Test
35+ run : pnpm run test
36+ - name : 🛳️ Publish
37+ if : ${{ github.event_name == 'release' }}
38+ run : pnpm publish
39+ env :
40+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
41+ - name : 📊 Upload Coverage
42+ if : ${{ github.event_name == 'release' }}
43+ uses : coverallsapp/github-action@1.1.3
5044 with :
5145 github-token : ${{ secrets.GITHUB_TOKEN }}
5246 path-to-lcov : coverage/lcov.info
5347
54- publish :
55- needs : build
56- if : ${{ github.event_name == 'release' }}
57- runs-on : ubuntu-latest
58- steps :
59- - if : success()
60- uses : actions/download-artifact@v2
61- id : download
62- with :
63- name : build-artifacts
64- - uses : actions/setup-node@v2
65- with :
66- node-version : 17.x
67- - run : npm publish
68- env :
69- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments