-
Notifications
You must be signed in to change notification settings - Fork 59
39 lines (37 loc) · 1.24 KB
/
setup_and_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This workflow does nothing on it's own. It's intended to be re-used by other
# workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows
name: Setup and build
on:
workflow_call:
jobs:
setup_and_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
# DO NOT MODIFY manually, this value is managed by renovate to ensure
# it stays in-sync with package.json. See .github/renovate.json5
node-version: 22
cache: yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: 'build'
path: 'build'