Skip to content

Commit 8236112

Browse files
committed
ci: use npm for publishing
1 parent 2949941 commit 8236112

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

.github/workflows/CI.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,20 @@ jobs:
9494
contents: write
9595
id-token: write
9696
steps:
97+
- uses: actions/checkout@v4
98+
99+
- name: Setup Node
100+
uses: actions/setup-node@v4
101+
with:
102+
node-version-file: ".nvmrc"
103+
registry-url: 'https://registry.npmjs.org'
104+
105+
- name: Setup Pnpm
106+
uses: pnpm/action-setup@v4
107+
108+
- name: Install dependencies
109+
run: pnpm install
110+
97111
- name: Merge Artifacts
98112
uses: actions/upload-artifact/merge@v4
99113
with:
@@ -135,21 +149,7 @@ jobs:
135149
test -f ./dist/linux-x64/minijson || exit 1
136150
test -f ./dist/win32-x64/minijson.exe || exit 1
137151
138-
- uses: actions/checkout@v4
139-
140-
- name: Setup Node
141-
uses: actions/setup-node@v4
142-
with:
143-
node-version-file: ".nvmrc"
144-
registry-url: 'https://registry.npmjs.org'
145-
146-
- name: Setup Pnpm
147-
uses: pnpm/action-setup@v4
148-
149-
- name: Install dependencies
150-
run: pnpm install
151-
152152
- name: Publish to npm
153-
run: pnpm publish --provenance --access public --no-git-checks
153+
run: npm publish --provenance --access public
154154
env:
155155
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"minijson": "dist/cli.js"
1616
},
1717
"files": [
18-
"dist/",
18+
"dist",
1919
"src/node"
2020
],
2121
"scripts": {
@@ -31,7 +31,7 @@
3131
"format": "prettier -l --cache --write . && pnpm run format.d",
3232
"format.d": "dub run --build=release --quiet dfmt -- --soft_max_line_length 110 --indent_size 2 --inplace ./src ./benchmark",
3333
"lint": "eslint . --fix",
34-
"prepublishOnly": "shx rm -rf ./dist/tsconfig.tsbuildinfo ./dist/*.zip ./dist/*.tar.* ./dist/build.*",
34+
"prepublishOnly": "shx rm -rf ./dist/tsconfig.tsbuildinfo ./dist/*.zip ./dist/*.tar.*",
3535
"start.benchmark.js": "node ./benchmark/js-benchmark.mjs",
3636
"start.benchmark.node": "node ./benchmark/native-benchmark.mjs",
3737
"start.browser": "servor ./dist/ --browse --reload",

0 commit comments

Comments
 (0)