Skip to content

Commit a51aa54

Browse files
committed
Publish CI packages in dependency order
The packages/* glob published angularjs and browser before core, so a failed run could leave a CI tag on a package whose exact dependency version didn't exist.
1 parent 7570a78 commit a51aa54

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ jobs:
175175
run: |
176176
# Re-runs of the same commit produce the same version; skip packages
177177
# that already exist and let every other publish failure fail the job.
178-
for dir in packages/*/; do
179-
dir="${dir%/}"
178+
# Publish in the root workspace order (dependencies first) so a package is
179+
# never published before the exact dependency version it requires.
180+
for dir in $(node -p "require('./package.json').workspaces.filter((w) => w.startsWith('packages/')).join('\n')"); do
180181
name=$(node -p "require('./$dir/package.json').name")
181182
existing=$(npm view "$name@$VERSION" version 2>/dev/null || true)
182183
if [ "$existing" = "$VERSION" ]; then

0 commit comments

Comments
 (0)