Skip to content

Commit a2ce42a

Browse files
authored
fix(release): use pnpm to publish to npm (#2075)
1 parent fee0764 commit a2ce42a

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.github/workflows/deploy-package.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ jobs:
3333
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
3434
env:
3535
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36-
- run: pnpm lerna publish -y --create-release github
36+
- name: Version package with lerna
37+
run: pnpm run release:version
3738
env:
3839
HUSKY: 0
3940
GH_TOKEN: ${{ secrets.GH_TOKEN }}
41+
42+
- name: Push version and tags
43+
run: git push origin HEAD:main --follow-tags
44+
45+
- name: Publish to npm
46+
run: pnpm run release:publish

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ coverage
2727
# Protobuf definition
2828
protobuf
2929
.bufcache
30+
31+
#lerna
32+
lerna-debug.log

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
"format": "biome check --linter-enabled=false --write .",
2424
"format:check": "biome check --linter-enabled=false --verbose .",
2525
"prettier": "prettier --write '**/*.{md,mdx,yml,yaml}'",
26+
"release:version": "pnpm lerna version -y --create-release-github",
27+
"release:publish": "pnpm -r publish --access public --no-git-checks",
2628
"lint": "eslint --cache .",
2729
"prepare": "husky",
2830
"test": "vitest run",

0 commit comments

Comments
 (0)