diff --git a/packages/font/package.json b/packages/font/package.json index 46159922ed612..0fa2d86a34779 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -16,8 +16,5 @@ "prepublishOnly": "cd ../../ && turbo run build", "dev": "tsc -d -w -p tsconfig.json", "typescript": "tsec --noEmit -p tsconfig.json" - }, - "publishConfig": { - "access": "public" } } diff --git a/scripts/publish-release.js b/scripts/publish-release.js index 8023406f94b1f..2cc606e068001 100755 --- a/scripts/publish-release.js +++ b/scripts/publish-release.js @@ -4,11 +4,12 @@ const path = require('path') const { readdir } = require('fs/promises') const { execSync } = require('child_process') +const { readJson } = require('fs-extra') const cwd = process.cwd() ;(async function () { - let isCanary = false + let isCanary = true if (!process.env.NPM_TOKEN) { console.log('No NPM_TOKEN, exiting...') @@ -18,7 +19,10 @@ const cwd = process.cwd() try { const tagOutput = execSync('git describe --exact-match').toString() console.log(tagOutput) - isCanary = tagOutput.includes('-canary') + + if (tagOutput.trim().startsWith('v')) { + isCanary = tagOutput.includes('-canary') + } } catch (err) { console.log(err) @@ -72,6 +76,14 @@ const cwd = process.cwd() } for (const packageDir of packageDirs) { + const pkgJson = await readJson( + path.join(packagesDir, packageDir, 'package.json') + ) + + if (pkgJson.private) { + console.log(`Skipping private package ${packageDir}`) + continue + } await publish(packageDir) } })()