Skip to content

Commit d5e21dc

Browse files
committed
fix: publish npm packages via pnpm pack to correctly resolve workspace dependencies
1 parent 199c79f commit d5e21dc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.changeset/cool-heads-sin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'protocol-launcher': patch
3+
---
4+
5+
fix: publish npm packages via pnpm pack to correctly resolve workspace dependencies

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ jobs:
3737
- name: Test Package
3838
run: pnpm run test
3939

40+
- name: Pack package
41+
run: pnpm -C packages/${{ env.PACKAGE_NAME }} pack
42+
4043
- name: Upload dist artifact
4144
uses: actions/upload-artifact@v6
4245
with:
43-
name: package
44-
path: packages/${{ env.PACKAGE_NAME }}
46+
name: npm-package
47+
path: packages/${{ env.PACKAGE_NAME }}/*.tgz
4548

4649
# - name: Publish NPM Package
4750
# run: |
@@ -60,11 +63,11 @@ jobs:
6063

6164
- uses: actions/download-artifact@v7
6265
with:
63-
name: package
66+
name: npm-package
6467
path: .
6568

6669
- uses: actions/setup-node@v6
6770
with:
6871
node-version: '24'
6972
registry-url: 'https://registry.npmjs.org'
70-
- run: npm publish --no-git-checks --provenance --access public
73+
- run: npm publish *.tgz --no-git-checks --provenance --access public

0 commit comments

Comments
 (0)