node yarn cache #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node yarn cache | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- os: "macos-13" | |
architecture: "x64" | |
- os: "macos-12" | |
architecture: "x64" | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.target.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'yarn' | |
cache-dependency-path: '**/yarn.lock' | |
- name: Setup cache key | |
id: cache-key | |
run: echo "CACHE_KEY=node-cache-${{ runner.os }}-${{ matrix.target.architecture }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}" >> $GITHUB_ENV | |
- name: Use node | |
run: | | |
node --version | |
yarn --version | |
yarn install |