|
10 | 10 | name: Prepare
|
11 | 11 | runs-on: ubuntu-latest
|
12 | 12 | outputs:
|
| 13 | + PACKAGE_NAME: ${{ steps.local-publish.outputs.package-name }} |
| 14 | + PACKAGE_SHASUM: ${{ steps.local-publish.outputs.package-shasum }} |
13 | 15 | YARN_CACHE_DIR: ${{ steps.yarn-cache-dir.outputs.YARN_CACHE_DIR }}
|
14 | 16 | YARN_VERSION: ${{ steps.yarn-version.outputs.YARN_VERSION }}
|
15 | 17 | strategy:
|
|
34 | 36 | key: yarn-cache-${{ runner.os }}-${{ steps.yarn-version.outputs.YARN_VERSION }}-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
|
35 | 37 | - name: Install Yarn dependencies
|
36 | 38 | run: yarn --immutable
|
| 39 | + - uses: legobeat/npm-actions/publish@dev-multi |
| 40 | + id: local-publish |
| 41 | + - name: Cache package registry |
| 42 | + uses: actions/cache@v3 |
| 43 | + with: |
| 44 | + path: /home/runner/work/_temp/_github_home/registry-data |
| 45 | + key: yarn-cache-${{ steps.local-publish.outputs.package-name }}-${{ steps.local-publish.outputs.package-shasum }} |
37 | 46 | build:
|
38 | 47 | name: Build
|
39 | 48 | runs-on: ubuntu-latest
|
@@ -67,16 +76,20 @@ jobs:
|
67 | 76 | runs-on: ubuntu-latest
|
68 | 77 | needs:
|
69 | 78 | - prepare
|
| 79 | + strategy: |
| 80 | + matrix: |
| 81 | + node-version: [18.x, 20.x] |
70 | 82 | steps:
|
71 | 83 | - uses: actions/checkout@v3
|
72 |
| - - uses: legobeat/npm-actions/publish@dev-multi |
73 |
| - id: local-publish |
74 |
| - - name: Cache package registry |
| 84 | + - name: Resture package registry cache |
75 | 85 | uses: actions/cache@v3
|
76 | 86 | with:
|
77 | 87 | path: /home/runner/work/_temp/_github_home/registry-data
|
78 |
| - key: yarn-cache-${{ steps.local-publish.outputs.package-name }}-${{ steps.local-publish.outputs.package-shasum }} |
| 88 | + key: yarn-cache-${{ needs.prepare.outputs.PACKAGE_NAME }}-${{ needs.prepare.outputs.PACKAGE_SHASUM }} |
79 | 89 | - uses: legobeat/npm-actions/compat-test@dev-multi
|
| 90 | + name: 'Install package as dependency using Node.js ${{ matrix.node-version }}' |
| 91 | + with: |
| 92 | + node-version: ${{ matrix.node-version }} |
80 | 93 | - name: Require clean working directory
|
81 | 94 | shell: bash
|
82 | 95 | run: |
|
|
0 commit comments