diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index 811dfc4d982ab..0dad8bd85dcc9 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -21,6 +21,9 @@ jobs: runs-on: ubuntu-latest env: NEXT_TELEMETRY_DISABLED: 1 + # we build a dev binary for use in CI so skip downloading + # canary next-swc binaries in the monorepo + NEXT_SKIP_NATIVE_POSTINSTALL: 1 outputs: docsChange: ${{ steps.docs-change.outputs.DOCS_CHANGE }} isRelease: ${{ steps.check-release.outputs.IS_RELEASE }} diff --git a/scripts/install-native.mjs b/scripts/install-native.mjs index 2eb521e5464d7..a52305df8881b 100644 --- a/scripts/install-native.mjs +++ b/scripts/install-native.mjs @@ -3,6 +3,13 @@ import path from 'path' import execa from 'execa' import fs from 'fs-extra' ;(async function () { + if (process.env.NEXT_SKIP_NATIVE_POSTINSTALL) { + console.log( + `Skipping next-swc postinstall due to NEXT_SKIP_NATIVE_POSTINSTALL env` + ) + return + } + try { let tmpdir = path.join(os.tmpdir(), `next-swc-${Date.now()}`) await fs.ensureDir(tmpdir)