From 71273c0db90b4e5c1cbc8bad20ce3bafd88ce6cb Mon Sep 17 00:00:00 2001 From: Luigi Pederzani Date: Sun, 5 Oct 2025 18:22:33 +0200 Subject: [PATCH 1/2] fix(ci): migrate release workflow from npm to pnpm with caching --- .github/workflows/release.yml | 50 +++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a91d7945..6339033e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,17 +42,34 @@ jobs: with: node-version: 22.x + - uses: pnpm/action-setup@v4 + with: + version: 10.6.1 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install dependencies - run: npm install + run: pnpm install --frozen-lockfile - name: Lint - run: npm run lint + run: pnpm run lint - name: Build - run: npm run build + run: pnpm run build - name: Run tests - run: npm test || echo "No tests found, skipping test step" + run: pnpm test || echo "No tests found, skipping test step" publish: runs-on: ubuntu-latest @@ -67,11 +84,28 @@ jobs: node-version: 22.x registry-url: 'https://registry.npmjs.org' + - uses: pnpm/action-setup@v4 + with: + version: 10.6.1 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install dependencies - run: npm install + run: pnpm install --frozen-lockfile - name: Build - run: npm run build + run: pnpm run build - name: Generate changelog id: changelog @@ -88,12 +122,12 @@ jobs: body: | ${{ steps.changelog.outputs.changelog }} - **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ github.ref_name }}...HEAD + **Full Changelog**: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }} draft: false prerelease: false - name: Publish to NPM - run: npm publish + run: pnpm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} From 3e65e247242cb0af8610cda365e31414fb980a7f Mon Sep 17 00:00:00 2001 From: Luigi Pederzani Date: Sun, 5 Oct 2025 18:24:51 +0200 Subject: [PATCH 2/2] fix(ci): remove test failure masking in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6339033e..bb8f7ac1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,7 +69,7 @@ jobs: run: pnpm run build - name: Run tests - run: pnpm test || echo "No tests found, skipping test step" + run: pnpm run test:run publish: runs-on: ubuntu-latest