-
Notifications
You must be signed in to change notification settings - Fork 233
97 lines (95 loc) · 2.8 KB
/
build-somnia.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build Somnia
on:
push:
branches:
- master
pull_request:
paths-ignore:
- 'apps/frontend/**'
- 'apps/frontend-e2e/**'
- 'apps/gi-frontend/**'
- 'apps/gi-frontend-e2e/**'
- 'apps/sr-frontend/**'
- 'apps/sr-frontend-e2e/**'
- 'libs/common/database-ui/**'
- 'libs/common/img-util/**'
- 'libs/common/react-util/**'
- 'libs/common/svgicons/**'
- 'libs/common/ui/**'
- 'libs/gi/art-scanner/**'
- 'libs/gi/assets/**'
- 'libs/gi/char-cards/**'
- 'libs/gi/db-ui/**'
- 'libs/gi/formula-ui/**'
- 'libs/gi/frontend-gql/**'
- 'libs/gi/i18n/**'
- 'libs/gi/page-*/**'
- 'libs/gi/prisma-schema/**'
- 'libs/gi/silly-wisher/**'
- 'libs/gi/silly-wisher-names/**'
- 'libs/gi/solver/**'
- 'libs/gi/solver-tc/**'
- 'libs/gi/supabase/**'
- 'libs/gi/svgicons/**'
- 'libs/gi/ui/**'
- 'libs/gi/uidata/**'
- 'libs/gi/wr/**'
- 'libs/sr/assets/**'
- 'libs/sr/i18n/**'
- 'libs/sr/page-*/**'
- 'libs/sr/solver/**'
- 'libs/sr/ui/**'
types: [opened, reopened, synchronize, labeled]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
name: 'call-build / build'
steps:
- uses: actions/checkout@v4
- name: Get Cache Key
id: get-cache-key
run: |
echo "key=$(git ls-tree -r HEAD | grep '^160000' | sha256sum | cut -d " " -f 1)" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v4
with:
path: .git/modules
key: submodule-${{ steps.get-cache-key.outputs.key }}
restore-keys: |
submodule-
- uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Yarn install
run: |
yarn install --immutable --immutable-cache
- name: Build Somnia
run: |
NX_DAEMON="false"
cp apps/somnia/src/config.empty.json apps/somnia/src/config.json
yarn run nx run somnia:build:production
- name: echos
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "somnia-prod" > environment
else
echo "somnia-test" > environment
fi
echo $(git rev-parse HEAD) > ref
echo ${{ contains(github.event.pull_request.labels.*.name, 'deploySomnia') }} > shouldDeploy
echo ${{ github.event.number }} > prNumber
- name: Archive build
uses: actions/upload-artifact@v4
with:
name: somnia_build
path: |
dist/apps/somnia
environment
ref
shouldDeploy
prNumber