Skip to content

Commit 5d49427

Browse files
committed
fix: build fails if core package is not released
1 parent 916f79c commit 5d49427

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/npm-publish.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,24 @@ jobs:
3030
registry-url: https://registry.npmjs.org
3131
cache: npm
3232

33+
# Internal packages may not exist in the npm registry yet. Normalize
34+
# their dependency specs temporarily so npm links every dependency from
35+
# the checked-out workspaces instead of trying to download it.
36+
- name: Link local workspace packages
37+
run: node scripts/link-local-workspaces.mjs
38+
3339
- name: Install dependencies
34-
run: npm ci --no-audit --no-fund
40+
run: npm install --no-audit --no-fund
3541

3642
- name: Build publishable packages
3743
run: npm run build:packages
3844

45+
# link-local-workspaces.mjs changes internal dependency specs to "*".
46+
# Restore the committed manifests after the build so those temporary
47+
# specs are never included in a published package.
48+
- name: Restore package manifests for publishing
49+
run: git submodule foreach --recursive 'git restore --source=HEAD -- package.json'
50+
3951
- name: Preview npm packages
4052
shell: bash
4153
run: |

0 commit comments

Comments
 (0)