Skip to content

Commit

Permalink
ci: Fix bad corepack cannot find matching keyid (#5603)
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Feb 5, 2025
1 parent 27d5ad0 commit 2e36cb5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci_bindings_nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ name: Bindings NodeJS CI

env:
DEBUG: napi:*
MACOSX_DEPLOYMENT_TARGET: '10.13'
MACOSX_DEPLOYMENT_TARGET: "10.13"

on:
push:
branches:
- main
tags:
- '*'
- "*"
pull_request:
branches:
- main
Expand Down Expand Up @@ -57,12 +57,12 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: "18"
cache: pnpm
cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"

- name: Corepack
run: corepack enable
run: npm i -g --force corepack && corepack enable

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
-e NAPI_TARGET=x86_64-unknown-linux-gnu \
-w /build/bindings/nodejs \
ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian \
bash -c "corepack enable && pnpm build"
bash -c "npm i -g --force corepack && corepack enable && pnpm build"
cd bindings/nodejs
# change owner to current user
sudo chown -R 1001:121 *.node
Expand All @@ -112,6 +112,7 @@ jobs:
ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 \
bash -c "set -e &&
rustup target add aarch64-unknown-linux-gnu &&
npm i -g --force corepack &&
corepack enable &&
pnpm build --target aarch64-unknown-linux-gnu &&
aarch64-unknown-linux-gnu-strip *.node"
Expand All @@ -127,6 +128,7 @@ jobs:
ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine \
bash -c "set -e &&
rustup target add aarch64-unknown-linux-musl &&
npm i -g --force corepack &&
corepack enable &&
pnpm build --target aarch64-unknown-linux-musl &&
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node"
Expand All @@ -142,11 +144,11 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: "18"
cache: pnpm
cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"
- name: Corepack
run: corepack enable
run: npm i -g --force corepack && corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
Expand Down Expand Up @@ -191,11 +193,11 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: "18"
cache: pnpm
cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"
- name: Corepack
run: corepack enable
run: npm i -g --force corepack && corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
Expand Down Expand Up @@ -247,7 +249,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: "18"
cache: pnpm
cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"
- name: Corepack
Expand All @@ -265,7 +267,7 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
needs: [ macos, linux, windows ]
needs: [macos, linux, windows]
permissions:
id-token: write

Expand All @@ -286,7 +288,7 @@ jobs:
cache: pnpm
cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"
- name: Corepack
run: corepack enable
run: npm i -g --force corepack && corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:

- name: Corepack
working-directory: website
run: corepack enable
run: npm i -g --force corepack && corepack enable

- name: Install Dependencies
working-directory: website
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"
- name: Corepack
working-directory: bindings/nodejs
run: corepack enable
run: npm i -g --force corepack && corepack enable

- name: Install dependencies
working-directory: bindings/nodejs
Expand Down Expand Up @@ -521,7 +521,7 @@ jobs:

- name: Corepack
working-directory: website
run: corepack enable
run: npm i -g --force corepack && corepack enable

- name: Download rust docs
uses: actions/download-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_behavior_binding_nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: "18"
cache: pnpm
cache-dependency-path: "bindings/nodejs/pnpm-lock.yaml"

- name: Corepack
working-directory: bindings/nodejs
run: corepack enable
run: npm i -g --force corepack && corepack enable

- name: Install dependencies
working-directory: bindings/nodejs
Expand Down

0 comments on commit 2e36cb5

Please sign in to comment.