Skip to content

Commit 77009ab

Browse files
committed
chore: fix v4 publish script
1 parent acc8ac8 commit 77009ab

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424

2525
jobs:
2626
test-and-publish:
27-
if: github.repository == 'TanStack/query' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/v4')
27+
if: github.repository == 'TanStack/query'
2828
name: 'Test & Publish'
2929
runs-on: ubuntu-latest
3030
steps:

scripts/publish.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,14 @@ async function run() {
371371
}
372372

373373
console.info()
374-
console.info(`Publishing all packages to npm with tag "${npmTag}"`)
374+
console.info(`Publishing all packages to npm`)
375375

376376
// Publish each package
377377
changedPackages.forEach((pkg) => {
378378
const packageDir = path.join(rootDir, 'packages', pkg.packageDir)
379-
const cmd = `cd ${packageDir} && pnpm publish --tag ${npmTag} --access=public --no-git-checks`
380-
console.info(
381-
` Publishing ${pkg.name}@${version} to npm with tag "${npmTag}"...`,
382-
)
379+
const tagParam = branchConfig.previousVersion ? `--tag ${npmTag}` : ''
380+
const cmd = `cd ${packageDir} && pnpm publish ${tagParam} --access=public --no-git-checks`
381+
console.info(` Publishing ${pkg.name}@${version} to npm "${tagParam}"...`)
383382
execSync(cmd, {
384383
stdio: [process.stdin, process.stdout, process.stderr],
385384
})

0 commit comments

Comments
 (0)