File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Library to NPM
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ publish :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - uses : actions/setup-node@v4
14+ with :
15+ node-version : ' 20'
16+ registry-url : ' https://registry.npmjs.org'
17+
18+ - uses : oven-sh/setup-bun@v1
19+ with :
20+ bun-version : latest
21+
22+ - name : Install dependencies
23+ run : bun install --frozen-lockfile
24+
25+ - name : Build library
26+ run : bun run build:lib
27+ working-directory : .
28+
29+ - name : Create package.json for library
30+ run : |
31+ cd dist/lib
32+ {
33+ echo '{
34+ "name": "@bluerobotics/cockpit-api",
35+ "version": "'${{ github.ref_name }}'",
36+ "main": "cockpit-external-api.umd.js",
37+ "module": "cockpit-external-api.es.js",
38+ "types": "types/index.d.ts",
39+ "publishConfig": {
40+ "access": "public"
41+ }
42+ }'
43+ } > package.json
44+
45+ - name : Publish to NPM
46+ run : npm publish
47+ working-directory : dist/lib
48+ env :
49+ NODE_AUTH_TOKEN : ${{ secrets.NPM }}
You can’t perform that action at this time.
0 commit comments