File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish File Upload Library Package
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v4
14+
15+ - name : Set up Node.js
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : ' 22.15.0'
19+ cache : ' npm'
20+
21+ - name : Restore node_modules cache
22+ id : cache
23+ uses : actions/cache@v4
24+ with :
25+ path : node_modules
26+ key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
27+ restore-keys : |
28+ ${{ runner.os }}-node-modules-
29+
30+ - name : Install dependencies
31+ run : npm ci
32+
33+ - name : Save node_modules cache
34+ if : steps.cache.outputs.cache-hit != 'true'
35+ uses : actions/cache@v4
36+ with :
37+ path : node_modules
38+ key : ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
39+
40+ - name : Build and publish package
41+ env :
42+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
43+ run : |
44+ npm run build
45+ cp package.json ./dist/package.json
46+ echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
47+ npm publish dist --access=public
48+
Original file line number Diff line number Diff line change 11name : Code Quality Checks
22
33on :
4- push :
4+ pull_request :
55 branches :
66 - ' **'
77
You can’t perform that action at this time.
0 commit comments