diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7049c17..3d39227 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,52 +1,39 @@ # 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 runs-on: ubuntu-latest needs: lint-test + timeout-minutes: 5 permissions: # Needed by googleapis/release-please-action@v4 contents: write 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 @@ -57,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 }}