| 1 | name: "Setup Packages" |
| 2 | description: "Cache and build packages with npm caching" |
| 3 | |
| 4 | runs: |
| 5 | using: "composite" |
| 6 | steps: |
| 7 | - uses: actions/setup-node@v4 |
| 8 | with: |
| 9 | node-version-file: ".nvmrc" |
| 10 | - uses: actions/cache@v4 |
| 11 | with: |
| 12 | path: ~/.npm |
| 13 | key: ${{ runner.os }}-npm-cache-packages-${{ hashFiles('packages/*/package-lock.json') }} |
| 14 | |
| 15 | - uses: actions/cache@v4 |
| 16 | with: |
| 17 | path: | |
| 18 | packages/*/node_modules |
| 19 | key: ${{ runner.os }}-packages-node-modules-${{ hashFiles('packages/*/package-lock.json') }} |
| 20 | |
| 21 | - name: Build packages |
| 22 | shell: bash |
| 23 | run: node ./scripts/build-packages.js |