UNPKG

@o3r/pipeline

Version:

A package that provides toolchain related helpers.

36 lines (34 loc) 1.28 kB
name: Setup and Install description: Sets up Node.js and installs dependencies runs: using: "composite" steps: - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 22<% if (packageManager !== 'yarn') { %> cache: <%= packageManager %><% } %> - name: Enable Corepack shell: bash run: corepack enable<% if (packageManager === 'yarn') { %> - name: Get yarn cache directory path shell: bash id: yarn-cache-dir-path run: echo "dir=$(<% if (yarn2) { %>yarn config get cacheFolder<% } else { %>yarn cache dir<% } %>)" >> $GITHUB_OUTPUT - name: Cache dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: | ${{ steps.yarn-cache-dir-path.outputs.dir }} <% if (yarn2) { %>.yarn/unplugged .pnp.cjs .pnp.loader.mjs<% } %> key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn ${{ runner.os }}<% } %> - name: Install<% if (npmRegistry) { %> env: COREPACK_NPM_REGISTRY: <%= npmRegistry %> COREPACK_INTEGRITY_KEYS: ""<% } %> shell: bash run: <%= setupCommand %>