Skip to content

Commit 2c2129e

Browse files
tmp
1 parent 227ff40 commit 2c2129e

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: CI
22

33
on: [push]
44

5+
env:
6+
BUILD_CACHE_KEY: ${{ github.sha }}-dist
57
jobs:
68
lint:
79
runs-on: ubuntu-latest
@@ -23,6 +25,12 @@ jobs:
2325

2426
- run: yarn build
2527

28+
- name: Cache Build Output
29+
uses: actions/cache@v5
30+
with:
31+
path: ./dist
32+
key: '${{ env.BUILD_CACHE_KEY }}'
33+
2634
- name: Validate CJS bundle with Node ${{ env.NODE_VERSION }}
2735
run: yarn validate-cjs
2836

@@ -62,9 +70,17 @@ jobs:
6270

6371
- uses: ./.github/actions/setup-node
6472
env:
65-
NODE_ENV: ""
73+
NODE_ENV: ''
74+
75+
- name: Recover Build Output
76+
id: build-cache
77+
uses: actions/cache@v5
78+
with:
79+
path: ./dist
80+
key: '${{ env.BUILD_CACHE_KEY }}'
6681

6782
- name: Build SDK
83+
if: steps.build-cache.outputs.cache-hit != 'true'
6884
run: yarn build
6985

7086
- name: Install example dependencies

0 commit comments

Comments
 (0)