Skip to content

Commit acc4af9

Browse files
committed
fix(release): publish with pnpm to remove workspace inside package.json
1 parent fee0764 commit acc4af9

File tree

6 files changed

+5607
-2032
lines changed

6 files changed

+5607
-2032
lines changed

.github/workflows/deploy-package.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ 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+
37+
- name: Version package with lerna
38+
run: pnpm lerna version -y --no-push --no-private
3739
env:
3840
HUSKY: 0
3941
GH_TOKEN: ${{ secrets.GH_TOKEN }}
42+
43+
- name: Publish to npm
44+
run: pnpm -r publish --access public --tag latest

.gitignore

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

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#https://pnpm.io/settings#nodelinker
2+
# We are using bundledDependencies
3+
node-linker=hoisted

lerna.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"changelogPreset": "conventionalcommits"
99
},
1010
"version": {
11-
"message": "chore(release): publish"
11+
"conventionalCommits": true,
12+
"message": "chore(release): publish %s",
13+
"createRelease": "github"
1214
}
1315
},
1416
"$schema": "node_modules/lerna/schemas/lerna-schema.json"

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
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 --no-changelog --no-push --no-git-tag-version --no-private",
27+
"release:publish": "pnpm -r publish --access public --tag latest",
28+
"release:publish:dry-run": "pnpm publish --recursive --tag latest --registry=\"http://localhost:4873/\"",
2629
"lint": "eslint --cache .",
2730
"prepare": "husky",
2831
"test": "vitest run",

0 commit comments

Comments
 (0)