-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathaction.yml
44 lines (39 loc) Β· 1.33 KB
/
action.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
40
41
42
43
44
inputs:
minify-bundle:
description: 'Whether to minify the bundle'
required: false
default: 'false'
node-version:
description: 'The version of Node.js to use'
required: false
default: '22'
runs:
using: composite
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
#region Build the standard bundle
- uses: actions/cache@v4
id: cache-build
with:
path: packages/yarnpkg-cli/bundles/yarn.js
key: cli-bundle-minified-${{ inputs.minify-bundle }}-${{ github.sha }}
- name: 'Build the standard bundle'
if: steps.cache-build.outputs.cache-hit != 'true'
run: |
node ./scripts/run-yarn.js build:cli ${{ inputs.minify-bundle == 'false' && '--no-minify' || '' }}
shell: bash
#endregion
#region Cache workflow dependencies
- name: Get global path
id: global-path
run: echo "globalFolder=$(YARN_IGNORE_PATH=1 node packages/yarnpkg-cli/bundles/yarn.js config get globalFolder)" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/cache@v4
with:
path: |
${{ steps.global-path.outputs.globalFolder }}/cache
${{ steps.global-path.outputs.globalFolder }}/metadata
key: dependencies-${{ runner.os }}-${{ github.workflow }}-${{ github.sha }}
#endregion