Skip to content

Commit

Permalink
fix: publish config for typst.node
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Jun 28, 2024
1 parent 59cc3b4 commit d343b3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/release-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -411,18 +411,8 @@ jobs:
shell: bash
- name: Publish
run: |
npm config set provenance true
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public || exit 0
elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --tag next --access public || exit 0
else
echo "Not a release, skipping publish"
fi
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --verbose --provenance --access public || exit 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 5 additions & 1 deletion packages/typst.node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"index.js"
],
"napi": {
"name": "typst-ts-node-compiler",
"binaryName": "typst-ts-node-compiler",
"// todo triple": "x86_64-unknown-freebsd",
"triples": {
"defaults": true,
Expand All @@ -39,6 +39,10 @@
"engines": {
"node": ">= 10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"scripts": {
"artifacts": "napi artifacts",
"bench": "node -r @swc-node/register benchmark/bench.ts",
Expand Down

0 comments on commit d343b3b

Please sign in to comment.