diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4ff3179..da47fab9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,33 +16,20 @@ jobs: build: name: Check and build codebase runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x, 18.x] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - # Wireit cache - - uses: google/wireit@setup-github-actions-caching/v1 + - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2.2.2 + - uses: pnpm/action-setup@v3 with: version: 7 - - name: Get pnpm store directory - id: pnpm-cache - run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" - - - name: Setup pnpm cache - uses: actions/cache@v3 + - uses: actions/setup-node@v4 with: - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('./pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + cache: 'pnpm' + node-version: 18.x + + # Wireit cache + - uses: google/wireit@setup-github-actions-caching/v1 - name: Install dependencies run: pnpm install @@ -52,7 +39,7 @@ jobs: # - name: Clear all caches # run: pnpm clean:cache - - name: Build Code and Examples ${{ matrix.node-version }} + - name: Build Code and Examples run: pnpm run build # We build in-source files like `examples/one-page/index.html`. @@ -60,5 +47,5 @@ jobs: - name: Check generated in-source files run: git diff --no-ext-diff --quiet --exit-code - - name: Check Code ${{ matrix.node-version }} + - name: Check Code run: pnpm run check:ci diff --git a/.github/workflows/create-spectacle.yml b/.github/workflows/create-spectacle.yml index 9af611c6..dc265e11 100644 --- a/.github/workflows/create-spectacle.yml +++ b/.github/workflows/create-spectacle.yml @@ -24,29 +24,19 @@ jobs: node-version: [18.x] create-type: ['tsx', 'onepage'] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - # Wireit cache - - uses: google/wireit@setup-github-actions-caching/v1 + - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2.2.2 + - uses: pnpm/action-setup@v3 with: version: 7 - - name: Get pnpm store directory - id: pnpm-cache - run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" - - - name: Setup pnpm cache - uses: actions/cache@v3 + - uses: actions/setup-node@v4 with: - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('./pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + cache: 'pnpm' + node-version: ${{ matrix.node-version }} + + # Wireit cache + - uses: google/wireit@setup-github-actions-caching/v1 - name: Install dependencies run: pnpm install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f70606cb..cd32a551 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,30 +18,18 @@ jobs: pull-requests: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 18.x - - - uses: pnpm/action-setup@v2.2.2 + - uses: pnpm/action-setup@v3 with: version: 7 - - name: Get pnpm store directory - id: pnpm-cache - run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" - - - name: Setup pnpm cache - uses: actions/cache@v3 + - uses: actions/setup-node@v4 with: - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + cache: 'pnpm' + node-version: 18.x - name: Install dependencies run: pnpm install