From cbceefeeefa0ce6712a02d989ccce2fc7d6fe577 Mon Sep 17 00:00:00 2001 From: DevelopmentCats Date: Fri, 31 Oct 2025 18:46:38 +0000 Subject: [PATCH] chore: update CI workflows to set package version dynamically since the update to yarn 4 and adjust TypeScript compilation directory --- .github/workflows/release.yaml | 8 +++++--- .github/workflows/test.yaml | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e4216d50..fe2898d4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -60,12 +60,14 @@ jobs: - run: yarn install --frozen-lockfile - run: yarn lint - run: yarn test - # Must run tsc first to generate the .d.ts files. - run: yarn tsc - working-directory: . + working-directory: ${{ github.workspace }} - run: yarn build # Version it with the version in the tag and upload it to a draft release. - - run: yarn version --new-version ${{ needs.split-tag.outputs.version }} + - name: Set version + run: | + node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json')); pkg.version='${{ needs.split-tag.outputs.version }}'; fs.writeFileSync('package.json', JSON.stringify(pkg,null,2)+'\n');" + echo "Set version to ${{ needs.split-tag.outputs.version }}" - run: yarn pack - uses: softprops/action-gh-release@v2 with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6a621078..5f3db85a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -77,8 +77,9 @@ jobs: - run: yarn test id: test if: success() || failure() + # Run tsc from repository root to generate shared .d.ts files for all plugins - run: yarn tsc - working-directory: . + working-directory: ${{ github.workspace }} if: success() || failure() # Build the plugin - run: yarn build