Unverified Commit 367117e8 authored by Maia Teegarden's avatar Maia Teegarden Committed by GitHub

publish flow fixes (#28050)

* Publish native packages publicly

* Remove unnecessary await

* Use --no-git-reset lerna option
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent b11bd492
......@@ -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(
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment