Skip to content

Commit dd95a55

Browse files
committed
ci: update publish
1 parent 1c1a94b commit dd95a55

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

.github/workflows/npm-publish.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ jobs:
1111

1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Install Node.js
17-
uses: actions/setup-node@v3
17+
uses: actions/setup-node@v4
1818
with:
19-
node-version: 18
19+
node-version: 20
2020

21-
- uses: pnpm/action-setup@v2
21+
- uses: pnpm/action-setup@v4
2222
name: Install pnpm
2323
id: pnpm-install
2424
with:
25-
version: 8
25+
version: 9
2626
run_install: false
2727

2828
- name: Get pnpm store directory
@@ -31,7 +31,7 @@ jobs:
3131
run: |
3232
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
3333
34-
- uses: actions/cache@v3
34+
- uses: actions/cache@v4
3535
name: Setup pnpm cache
3636
with:
3737
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
@@ -46,7 +46,7 @@ jobs:
4646
run: pnpm build
4747

4848
- name: Publish
49-
uses: JS-DevTools/npm-publish@v1
50-
with:
51-
token: ${{ secrets.NPM_TOKEN }}
52-
access: public
49+
shell: bash
50+
run: |
51+
echo "//registry.npmjs.org/:_authToken="${{ secrets.NPM_TOKEN }}"" > ~/.npmrc
52+
pnpm publish --access public

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@
1111
"types"
1212
],
1313
"packageManager": "pnpm@9.9.0",
14+
"engines": {
15+
"node": ">=20"
16+
},
1417
"scripts": {
1518
"dev": "tsup --watch",
1619
"build": "tsup",
1720
"test": "vitest",
1821
"test:ui": "vitest --ui --watch",
1922
"dev:examples": "turbo run dev --filter=./examples/*",
2023
"build:examples": "turbo run build --filter=./examples/*",
21-
"format": "prettier --write --ignore-unknown **",
22-
"prepublishOnly": "pnpm build"
24+
"format": "prettier --write --ignore-unknown **"
2325
},
2426
"repository": {
2527
"type": "git",

0 commit comments

Comments
 (0)