-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
71 lines (68 loc) · 1.96 KB
/
assets.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build assets
env:
ACTIONS_STEP_DEBUG: true
on:
push:
paths:
- '.github/workflows/assets.yml'
- 'public/**'
- 'ui/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'bin/download-lifat'
pull_request:
paths:
- '.github/workflows/assets.yml'
- 'public/**'
- 'ui/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'bin/download-lifat'
jobs:
assets:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup node and restore pnpm cache
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install pnpm dependencies
run: pnpm install
- name: Checkout ab (optional)
uses: actions/checkout@v4
with:
repository: lichess-org/ab
ssh-key: ${{ secrets.id_rsa_ab }}
ref: master
path: ab
env:
HAS_AB: ${{ secrets.id_rsa_ab != '' }}
if: env.HAS_AB == 'true'
id: ab
- name: Link ab (optional)
run: pnpm link "$GITHUB_WORKSPACE/ab"
if: steps.ab.outcome == 'success'
- name: Print tool versions
run: node -v && pnpm -v && cd ui/.build && pnpm tsc -v
- name: Build
run: ./ui/build --no-install -p
- name: Tests
run: pnpm test
working-directory: ui
- name: Prepare asset dir
run: mkdir assets && mv public assets/ && cp -p bin/download-lifat LICENSE COPYING.md README.md assets/ && git log -n 1 --pretty=oneline > assets/commit.txt
- name: Tar assets
run: cd assets && tar --zstd -cvpf ../assets.tar.zst . && cd -
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: lila-assets
path: assets.tar.zst
compression-level: 0 # already compressed