Skip to content

Commit ba30607

Browse files
authored
chore(*): update publish-package script for trusted publishing (#485)
This pull request updates the `publish-package` script in `package.json` to use a direct Node.js command for publishing packages, replacing the previous Lerna-based approach. **Build and publish process:** * Updated the `publish-package` script to use a Node.js command that runs `npm publish --ws`, dynamically adding the `--tag next` flag if the version in `lerna.json` contains a hyphen (indicating a pre-release version). This replaces the previous use of `lerna publish` and streamlines the publishing process.
1 parent 729aa92 commit ba30607

File tree

2 files changed

+1
-41
lines changed

2 files changed

+1
-41
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"scripts": {
1414
"prepare": "husky",
15-
"publish-package": "npx lerna publish from-package --pre-dist-tag next --yes",
15+
"publish-package": "node -e \"require('child_process').execSync('npm publish --ws ' + (require('./lerna.json').version.includes('-') ? '--tag next' : ''), { stdio: 'inherit' })\"",
1616
"test": "npx lerna run test --concurrency 1",
1717
"test:pkg:cfg": "npm run test -w packages/clang-format-git",
1818
"test:pkg:cfgp": "npm run test -w packages/clang-format-git-python",

0 commit comments

Comments
 (0)