Skip to content

Commit

Permalink
chore: fix v4 publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianOsipiuk committed Oct 25, 2023
1 parent acc8ac8 commit 77009ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:

jobs:
test-and-publish:
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')
if: github.repository == 'TanStack/query'
name: 'Test & Publish'
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 4 additions & 5 deletions scripts/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,14 @@ async function run() {
}

console.info()
console.info(`Publishing all packages to npm with tag "${npmTag}"`)
console.info(`Publishing all packages to npm`)

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

0 comments on commit 77009ab

Please sign in to comment.