Skip to content

Commit

Permalink
build: fetch all git history, improve publish error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxuum committed Jul 20, 2024
1 parent f303c0b commit 8d61e45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/scripts/publish.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ for (const pkg of getChangedPackages(nightly)) {
console.log(`Set ${pkgName} version to ${version}`);
}

execSync(`yarn workspace ${pkgName} npm publish --tag ${tag}`);
console.log(`Published ${pkgName}@${tag} to npm`);
try {
execSync(`yarn workspace ${pkgName} npm publish --tag ${tag}`);
console.log(`Published ${pkgName}@${tag} to npm`);
} catch (err) {
console.error(`Failed to publish ${pkgName}@${tag} to npm`);
throw err.stdout.toString();
}
}
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Enable Corepack
run: corepack enable
Expand Down

0 comments on commit 8d61e45

Please sign in to comment.