Skip to content

Commit 5c09572

Browse files
committed
Fix publish workflow: prerelease tag, bin path, explicit build step
1 parent 850110b commit 5c09572

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,10 @@ jobs:
2020
- run: npm run format:check
2121
- run: npm run lint:check
2222
- run: npm test
23-
- run: npm publish --provenance --access public
23+
- run: npm run build
24+
- run: |
25+
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
26+
npm publish --provenance --access public --tag next
27+
else
28+
npm publish --provenance --access public
29+
fi

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,9 @@
3737
"default": "./dist/epub.js"
3838
}
3939
},
40-
"bin": {
41-
"epub": "./dist/cli.js"
42-
},
40+
"bin": "./dist/cli.js",
4341
"scripts": {
4442
"build": "tsc",
45-
"prepublishOnly": "npm run build",
4643
"format": "oxfmt --write '**/*.ts'",
4744
"format:check": "oxfmt --check '**/*.ts'",
4845
"lint": "oxlint -c oxlint.json --fix",

0 commit comments

Comments
 (0)