Skip to content

Commit

Permalink
ci: fix publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jul 11, 2024
1 parent e621316 commit 5d36996
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ jobs:
path: artifacts
- name: create npm dirs
run: |
pnpm napi create-npm-dirs
pnpm napi artifacts --build-output-dir packages/core
pnpm napi create-npm-dirs --package-json-path packages/core/package.json
pnpm napi artifacts --package-json-path packages/core/package.json --build-output-dir packages/core
- name: List packages
run: ls -R ./npm
shell: bash
Expand All @@ -332,11 +332,11 @@ jobs:
if git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+$";
then
pnpm napi pre-publish -t npm --package-json-path packages/core/package.json
pnpm publish --filter=@oxc/node-core --access public
pnpm publish --filter=@oxc/node-core --access public --no-git-checks
elif git log -1 --pretty=%B | grep "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+";
then
pnpm napi pre-publish -t npm --package-json-path packages/core/package.json
pnpm --filter=@oxc/node-core publish --tag next --access public
pnpm --filter=@oxc/node-core publish --tag next --access public --no-git-checks
else
echo "Not a release, skipping publish"
fi
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,4 @@ target/
*.node
*.wasm
pgo-data
/npm
21 changes: 1 addition & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"typescript": "^5.5.3"
},
"scripts": {
"build": "napi build --platform --release -o packages/core",
"build": "napi build --platform --release -o packages/core --package-json-path packages/core/package.json",
"format": "taplo fmt && prettier --write . && cargo fmt",
"lint": "oxlint",
"test": "pnpm --filter=integrate-module* run test",
Expand All @@ -41,24 +41,5 @@
"trailingComma": "all",
"singleQuote": true,
"arrowParens": "always"
},
"napi": {
"binaryName": "oxc-node",
"packageName": "@oxc/node-core",
"targets": [
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"aarch64-linux-android",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"aarch64-pc-windows-msvc",
"armv7-unknown-linux-gnueabihf",
"x86_64-unknown-linux-musl",
"i686-pc-windows-msvc",
"armv7-linux-androideabi",
"wasm32-wasip1-threads"
]
}
}
23 changes: 23 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,29 @@
"import": "./register.mjs"
}
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"napi": {
"binaryName": "oxc-node",
"packageName": "@oxc/node-core",
"targets": [
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"aarch64-linux-android",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"aarch64-pc-windows-msvc",
"armv7-unknown-linux-gnueabihf",
"x86_64-unknown-linux-musl",
"i686-pc-windows-msvc",
"armv7-linux-androideabi",
"wasm32-wasip1-threads"
]
},
"funding": [
{
"type": "github",
Expand Down

0 comments on commit 5d36996

Please sign in to comment.