From 5f23ff5bf9ebc81aed722bc5322cbe423ddfea9d Mon Sep 17 00:00:00 2001 From: Liu Yue Date: Wed, 1 Jan 2025 09:10:41 +0800 Subject: [PATCH] fix: Fix Github workflow about corepack --- .github/workflows/ci.yaml | 4 +--- .github/workflows/vsce-publish.yaml | 2 +- package.json | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91ed744..10c3f0f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,11 +2,9 @@ name: build-artifact on: push: branches: - - master - main pull_request: branches: - - master - main # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -17,7 +15,7 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - name: Install - run: yarn install + run: corepack enable && yarn install - name: Test run: yarn test && yarn build:ts && yarn build:syntax - name: Lint diff --git a/.github/workflows/vsce-publish.yaml b/.github/workflows/vsce-publish.yaml index 7437f58..101838c 100644 --- a/.github/workflows/vsce-publish.yaml +++ b/.github/workflows/vsce-publish.yaml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install and build - run: yarn install && yarn run build + run: corepack enable && yarn install yarn run build - name: Publish VS Code extension env: VSCE_PAT: ${{ secrets.VSCE_PAT }} diff --git a/package.json b/package.json index 8cc7bd8..03e6600 100644 --- a/package.json +++ b/package.json @@ -216,6 +216,10 @@ } ] }, + "vsce": { + "dependencies": false, + "yarn": false + }, "devDependencies": { "@swc/cli": "^0.5.2", "@swc/core": "^1.10.4",