10
10
# Allows you to run this workflow manually from the Actions tab
11
11
workflow_dispatch :
12
12
13
+ env :
14
+ node-version : 20
15
+
13
16
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
17
jobs :
15
18
# This workflow contains a single job called "build"
16
19
build :
17
20
runs-on : ubuntu-latest
18
- strategy :
19
- matrix :
20
- node-version : [18]
21
-
22
21
steps :
23
22
- name : Cancel Previous Runs
24
23
25
24
with :
26
25
access_token : ${{ github.token }}
27
- - uses : actions/checkout@v3
28
- - name : Use Node.js ${{ matrix .node-version }}
29
- uses : actions/setup-node@v3
26
+ - uses : actions/checkout@v4
27
+ - name : Use Node.js ${{ env .node-version }}
28
+ uses : actions/setup-node@v4
30
29
with :
31
- node-version : ${{ matrix .node-version }}
30
+ node-version : ${{ env .node-version }}
32
31
- name : Install Yarn
33
32
run : npm install -g yarn
34
33
- name : Get yarn cache directory path
35
34
id : yarn-cache-dir-path
36
- run : echo "::set-output name= dir:: $(yarn cache dir)"
35
+ run : echo "dir= $(yarn cache dir)" >> $GITHUB_OUTPUT
37
36
# - uses: everpcpc/actions-cache@v2
38
37
# env:
39
38
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -51,10 +50,19 @@ jobs:
51
50
# run: |
52
51
# rm -rf node_modules/@oraichain/oraidex-universal-swap/node_modules/@oraichain/oraidex-common
53
52
# rm -rf node_modules/@oraichain/oraiswap-v3/node_modules/@oraichain/oraidex-common
53
+ - id : yarn-cache
54
+ uses : actions/cache@v4
55
+ with :
56
+ path : |
57
+ ${{ steps.yarn-cache-dir-path.outputs.dir }}
58
+ node_modules
59
+ node_modules/.cache
60
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
61
+ restore-keys : ${{ runner.os }}-yarn-
54
62
- name : Install Dependencies
55
- if : steps.yarn-cache.outputs.cache-hit != 'true'
63
+ # if: steps.yarn-cache.outputs.cache-hit != 'true'
56
64
# run: yarn install --ignore-scripts
57
- run : yarn
65
+ run : yarn install --frozen-lockfile
58
66
- name : Copy env
59
67
run : cp .env.example .env
60
68
- name : Build Production
0 commit comments