diff --git a/scripts/publish-native.js b/scripts/publish-native.js index 07190f13ff3fe27..2cf276466fd4d09 100755 --- a/scripts/publish-native.js +++ b/scripts/publish-native.js @@ -15,7 +15,7 @@ const cwd = process.cwd() // Copy binaries to package folders, update version, and publish let nativePackagesDir = path.join(cwd, 'packages/next/build/swc/npm') - let platforms = await (await readdir(nativePackagesDir)).filter( + let platforms = await readdir(nativePackagesDir).filter( (name) => name !== '.gitignore' ) for (let platform of platforms) { @@ -33,9 +33,10 @@ const cwd = process.cwd() JSON.stringify(pkg, null, 2) ) execSync( - `npm publish ${path.join(nativePackagesDir, platform)}${ - gitref.includes('canary') ? ' --tag canary' : '' - }` + `npm publish ${path.join( + nativePackagesDir, + platform + )} --access public ${gitref.includes('canary') ? ' --tag canary' : ''}` ) // lerna publish in next step will fail if git status is not clean execSync( diff --git a/scripts/publish-release.sh b/scripts/publish-release.sh index 0cd68c3e0530cda..329fa28583f4dd5 100755 --- a/scripts/publish-release.sh +++ b/scripts/publish-release.sh @@ -15,7 +15,7 @@ fi if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then echo "Publishing canary" - yarn run lerna publish from-git --npm-tag canary --yes + yarn run lerna publish from-git --npm-tag canary --no-git-reset --yes # Make sure to exit script with code 1 if publish failed if [[ ! $? -eq 0 ]];then @@ -27,7 +27,7 @@ fi if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then echo "Publishing stable" - yarn run lerna publish from-git --yes + yarn run lerna publish from-git --no-git-reset --yes # Make sure to exit script with code 1 if publish failed if [[ ! $? -eq 0 ]];then