Skip to content

Commit 7196067

Browse files
balzssclaude
andcommitted
fix(ui-scripts): fix pnpm publish workflow failures after migration
Fix two issues introduced by the pnpm migration that caused GitHub Actions workflow failures: 1. ENEEDAUTH error on release commits: - Problem: .npmrc file with auth token was cleaned up before async publishing completed due to returning Promise instead of awaiting - Fix: Changed return to await for publishRegularVersion and publishSnapshotVersion so finally block runs after publishing finishes 2. ERR_PNPM_GIT_UNCLEAN error on snapshot releases: - Problem: pnpm publish checks git working tree by default (npm did not), and snapshot releases intentionally modify package.json files without committing (temporary version bumps for CI) - Fix: Added --no-git-checks flag to pnpm publish command to allow publishing with dirty working tree, matching previous npm behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 1cf6788 commit 7196067

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/ui-scripts/lib/commands/publish.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ async function publish({ packageName, version, isMaintenance, prRelease }) {
8585
? `v${version.split('.')[0]}_maintenance`
8686
: 'latest'
8787
info(`📦 Version: ${version}, Tag: ${tag}`)
88-
return publishRegularVersion({
88+
await publishRegularVersion({
8989
version,
9090
tag,
9191
packages
9292
})
9393
} else {
9494
const tag = prRelease ? 'pr-snapshot' : 'snapshot'
9595
info(`📦 Version: ${version}, Tag: ${tag}`)
96-
return publishSnapshotVersion({
96+
await publishSnapshotVersion({
9797
version,
9898
packageName,
9999
packages,
@@ -215,7 +215,7 @@ async function publishPackage(pkg, tag) {
215215
setTimeout(resolve, delay)
216216
})
217217

218-
const publishArgs = ['publish', pkg.location, '--tag', tag]
218+
const publishArgs = ['publish', pkg.location, '--tag', tag, '--no-git-checks']
219219
await runCommandAsync('pnpm', publishArgs)
220220

221221
return wait(500)

0 commit comments

Comments
 (0)