From d2dfd89a7eb94f8c38db5dfb1226355ed5f32d9e Mon Sep 17 00:00:00 2001 From: jserfeng <1114550440@qq.com> Date: Tue, 11 Jul 2023 19:18:02 +0800 Subject: [PATCH] fix(CI): enable corepack in docker --- .changeset/pretty-donuts-lay.md | 5 +++++ .github/workflows/release.yml | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/pretty-donuts-lay.md diff --git a/.changeset/pretty-donuts-lay.md b/.changeset/pretty-donuts-lay.md new file mode 100644 index 0000000..66d18ff --- /dev/null +++ b/.changeset/pretty-donuts-lay.md @@ -0,0 +1,5 @@ +--- +"@modern-js/swc-plugins": patch +--- + +fix(CI): enable corepack in docker diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3161db1..98d171b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,12 +25,13 @@ jobs: docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian build: |- set -e && + corepack enable && pnpm run build --target x86_64-unknown-linux-gnu && strip *.node - host: ubuntu-latest target: x86_64-unknown-linux-musl docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine - build: set -e && pnpm run build && strip *.node + build: set -e && corepack enable && pnpm run build && strip *.node - host: macos-latest target: aarch64-apple-darwin build: | @@ -41,7 +42,8 @@ jobs: docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 build: |- set -e && - rustup target add aarch64-unknown-linux-gnu + rustup target add aarch64-unknown-linux-gnu && + corepack enable && pnpm run build --target aarch64-unknown-linux-gnu && aarch64-unknown-linux-gnu-strip *.node # - host: ubuntu-latest @@ -58,6 +60,7 @@ jobs: build: |- set -e && rustup target add aarch64-unknown-linux-musl && + corepack enable && pnpm run build --target aarch64-unknown-linux-musl && /aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node - host: windows-latest