Skip to content

Commit c672089

Browse files
authored
Refactor npm publish workflow for granular workspaces (#251)
Split the NPM publish step into individual workspace-specific tasks for better error handling and maintainability. Each workspace is now published separately with `continue-on-error` enabled to ensure independent failures do not block the workflow. Signed-off-by: Alberto Ricart <[email protected]>
1 parent 1eb73aa commit c672089

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

.github/workflows/npm.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,39 @@ jobs:
4040
npm run clean --workspaces
4141
- name: Publish JSR
4242
run: deno publish --allow-dirty
43-
- name: Publish NPM
44-
run: npm publish --provenance --access public --tag=latest --workspaces
43+
44+
- name: Publish NPM core
45+
run: npm publish --provenance --access public --tag=latest --workspaces core
46+
continue-on-error: true
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
50+
- name: Publish NPM jetstream
51+
run: npm publish --provenance --access public --tag=latest --workspaces jetstream
52+
continue-on-error: true
4553
env:
4654
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
56+
- name: Publish NPM kv
57+
run: npm publish --provenance --access public --tag=latest --workspaces kv
58+
continue-on-error: true
59+
env:
60+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
61+
62+
- name: Publish NPM obj
63+
run: npm publish --provenance --access public --tag=latest --workspaces obj
64+
continue-on-error: true
65+
env:
66+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
67+
68+
- name: Publish NPM services
69+
run: npm publish --provenance --access public --tag=latest --workspaces services
70+
continue-on-error: true
71+
env:
72+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
73+
74+
- name: Publish NPM transport-node
75+
run: npm publish --provenance --access public --tag=latest --workspaces transport-node
76+
continue-on-error: true
77+
env:
78+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)