Skip to content

Commit 4e4204b

Browse files
committed
fix: publishing issues
1 parent 94891b9 commit 4e4204b

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3-
4-
name: Node.js Package
5-
1+
name: Publish Package to npmjs
62
on:
73
release:
84
types: [created]
9-
105
jobs:
116
build:
127
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
id-token: write
1311
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
12+
- uses: actions/checkout@v4
13+
# Setup .npmrc file to publish to npm
14+
- uses: actions/setup-node@v4
1615
with:
17-
node-version: 16
16+
node-version: "18"
17+
registry-url: "https://registry.npmjs.org"
1818
- run: npm ci
19-
- run: npm test
20-
21-
publish-npm:
22-
needs: build
23-
runs-on: ubuntu-latest
24-
steps:
25-
- uses: actions/checkout@v2
26-
- uses: actions/setup-node@v2
27-
with:
28-
node-version: 16
29-
registry-url: https://registry.npmjs.org/
30-
- run: npm ci
31-
- run: npm publish
19+
- run: npm run build
20+
- run: npm publish --provenance --access public
3221
env:
33-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
],
2525
"sideEffects": false,
2626
"scripts": {
27-
"build": "tsup",
27+
"build": "NODE_OPTIONS='--max-old-space-size=16384' tsup",
2828
"test": "vitest",
2929
"test:once": "vitest run",
3030
"test:coverage": "vitest --coverage",
3131
"dev": "tsup --watch",
32-
"prepare": "npm run build && husky install",
32+
"prepare": "husky install",
3333
"lint": "eslint src",
3434
"lint:fix": "eslint --fix",
3535
"prettier": "prettier src --check",
@@ -69,6 +69,7 @@
6969
"prettier-eslint": "^15.0.1",
7070
"ssri": "^11.0.0",
7171
"ts-node": "^10.9.2",
72+
"tsc": "^2.0.4",
7273
"tsup": "^8.0.1",
7374
"tsx": "^4.19.1",
7475
"typedoc": "^0.25.13",

0 commit comments

Comments
 (0)