From 4b3efcd830c2fd59588b7bc5e26138158da18a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Ferrer=20Gonza=CC=81lez?= Date: Tue, 4 Feb 2025 11:54:11 +0100 Subject: [PATCH 1/3] ci: add package publishing automation job timeout --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7049c17..c1dfe40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,7 @@ jobs: name: 📦 Publish runs-on: ubuntu-latest needs: lint-test + timeout-minutes: 5 permissions: # Needed by googleapis/release-please-action@v4 contents: write From 5e52ea117487cfee62748d44860e604be21cfc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Ferrer=20Gonza=CC=81lez?= Date: Tue, 4 Feb 2025 12:02:26 +0100 Subject: [PATCH 2/3] ci: update node version to the lates LTS available --- .github/workflows/ci.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1dfe40..83c5e94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,40 +1,27 @@ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: CI - on: push: branches: - main pull_request: - jobs: lint-test: name: 🚀 Lint and test runs-on: ubuntu-latest timeout-minutes: 5 - strategy: - matrix: - node: [ 18, 20 ] - steps: - - name: 👍 Checkout - uses: actions/checkout@v4 - - - name: 🐢 Setup node.js - uses: actions/setup-node@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} - cache: 'npm' - + node-version: lts/* + cache: npm - name: 📥 Install dependencies run: npm install - - name: 💅 Lint code style run: npm run lint - - name: ✅ Run tests run: npm run test - publish: if: github.ref == 'refs/heads/main' && github.event_name == 'push' name: 📦 Publish @@ -47,7 +34,6 @@ jobs: pull-requests: write # Needed by `npm publish --provenance` id-token: write - steps: - name: 🍄 Bump package version, create GitHub release, and update changelog uses: googleapis/release-please-action@v4 From d4ff7d4bc5be5a06b66270e097b84d1f7a816368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Ferrer=20Gonza=CC=81lez?= Date: Tue, 4 Feb 2025 12:02:52 +0100 Subject: [PATCH 3/3] ci: add npm cache to the publishing job --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83c5e94..3d39227 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,7 @@ jobs: if: ${{ steps.release.outputs.release_created }} with: node-version: lts/* + cache: npm registry-url: https://registry.npmjs.org - name: 🚀 Publish to npm if: ${{ steps.release.outputs.release_created }}