Skip to content

Commit 5faddd4

Browse files
committed
Updating workflows
1 parent a9557c2 commit 5faddd4

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ jobs:
1010
id-token: write
1111
steps:
1212
- uses: actions/checkout@v4
13-
# Setup .npmrc file to publish to npm
13+
- uses: pnpm/action-setup@v4
14+
with:
15+
version: 9.1.1
1416
- uses: actions/setup-node@v4
1517
with:
1618
node-version: '20.x'
1719
registry-url: 'https://registry.npmjs.org'
18-
- run: npm ci
19-
- run: npm publish --provenance --access public
20+
- name: Install Dependencies
21+
run: pnpm install
22+
- name: Test
23+
run: pnpm test
24+
- name: Build
25+
run: pnpm build
26+
- name: Publish
27+
run: npm publish --provenance --access public
2028
env:
2129
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@
88
"url": "https://github.com/near/pagoda-ui"
99
},
1010
"keywords": ["react", "component", "library", "near", "pagoda"],
11+
"scripts": {
12+
"dev": "rollup -c -w",
13+
"build": "rollup -c",
14+
"format": "prettier --check ./src",
15+
"format:fix": "prettier --write ./src",
16+
"lint": "eslint ./src/**/*.ts*",
17+
"lint:fix": "eslint . --fix",
18+
"pre-commit": "pnpm format && pnpm lint --max-warnings 0 && pnpm ts:check",
19+
"test": "pnpm pre-commit",
20+
"ts:check": "tsc --noEmit --incremental",
21+
"prepare": "husky"
22+
},
23+
"engines": {
24+
"node": ">=20",
25+
"pnpm": "9.1.1"
26+
},
27+
"packageManager": "[email protected]",
1128
"files": ["dist"],
1229
"main": "dist/index.cjs.js",
1330
"module": "dist/index.esm.js",
@@ -28,17 +45,6 @@
2845
"require": "./dist/*.css"
2946
}
3047
},
31-
"scripts": {
32-
"dev": "rollup -c -w",
33-
"build": "rollup -c",
34-
"format": "prettier --check ./src",
35-
"format:fix": "prettier --write ./src",
36-
"lint": "eslint ./src/**/*.ts*",
37-
"lint:fix": "eslint . --fix",
38-
"pre-commit": "pnpm format && pnpm lint --max-warnings 0 && pnpm ts:check",
39-
"ts:check": "tsc --noEmit --incremental",
40-
"prepare": "husky"
41-
},
4248
"peerDependencies": {
4349
"next": ">=13",
4450
"react": "^18",

0 commit comments

Comments
 (0)