Skip to content

Commit aa5b3eb

Browse files
committed
rename npm publish to build + update ci
1 parent b239c97 commit aa5b3eb

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

.github/workflows/npm-publish-github-packages.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ jobs:
2929
- uses: actions/checkout@v3
3030
- uses: actions/setup-node@v3
3131
with:
32-
node-version: 18
32+
node-version: 22
3333
- run: npm ci
3434
- run: npm install uglifyjs -g
35-
- run: npm run publish
35+
- run: npm run build
3636

3737
- name: Upload build artifact
3838
uses: actions/upload-artifact@v3
3939
with:
4040
name: servicestack-client
4141
path: |
42-
./dist/index.js
4342
./dist/index.d.ts
44-
./dist/servicestack-client.mjs
43+
./dist/index.js
4544
./dist/servicestack-client.min.js
4645
./dist/servicestack-client.min.mjs
46+
./dist/servicestack-client.mjs
4747
./dist/servicestack-client.umd.js
4848
4949
publish:
@@ -56,15 +56,9 @@ jobs:
5656
- uses: actions/checkout@v3
5757
- uses: actions/setup-node@v3
5858
with:
59-
node-version: 18
59+
node-version: 22
6060
registry-url: https://npm.pkg.github.com/
6161
- run: npm ci
62-
- name: Bump version
63-
run: |
64-
VERSION=$(jq -r '.version' package.json)
65-
HASH=$(git rev-parse --short HEAD)
66-
NEW_VERSION="$VERSION-preview-$HASH"
67-
jq --arg nv "$NEW_VERSION" '.version=$nv' package.json > "tmp.json" && mv "tmp.json" "package.json"
68-
- run: npm publish
62+
- run: npm release
6963
env:
7064
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"uglify": "npx -y uglify-js dist/servicestack-client.umd.js --compress --mangle -o dist/servicestack-client.min.js",
2020
"uglify-mjs": "npx -y uglify-js dist/servicestack-client.mjs --compress --mangle -o dist/servicestack-client.min.mjs",
2121
"mjs": "tsc -p tsconfig.mjs.json && shx mv dist/index.js dist/servicestack-client.mjs && npm run uglify-mjs",
22-
"publish": "tsc && npm run mjs && tsc -p tsconfig.umd.json && shx mv dist/index.js dist/servicestack-client.umd.js && bash inject-umd.sh && npm run uglify && shx mv src/index.js dist && shx cp src/index.d.ts dist",
2322
"dtos": "cd tests/dtos && typescript-ref",
2423
"test": "mocha",
2524
"test:browser": "mocha-headless-chrome -f http://localhost:8080/testrunner.html",
2625
"testonly": "mocha -t 5000 ./tests/serverevents.spec.js",
27-
"release": "bump patch --commit --push --tag && npm publish"
26+
"build": "tsc && npm run mjs && tsc -p tsconfig.umd.json && shx mv dist/index.js dist/servicestack-client.umd.js && bash inject-umd.sh && npm run uglify && shx mv src/index.js dist && shx cp src/index.d.ts dist",
27+
"release": "npm run build && bump patch --commit --push --tag && npm publish"
2828
},
2929
"files": [
3030
"dist/index.js",

0 commit comments

Comments
 (0)