-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
88 lines (81 loc) · 2.04 KB
/
build.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
name: Build
on:
push:
branches:
- master
- "[0-9]+_[0-9]+_X"
- actions_tests
pull_request:
jobs:
android:
runs-on: ubuntu-20.04
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
USE_CCACHE: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Android build
uses: ./.github/actions/build-android
with:
node-version: '20.x'
java-version: '17'
ios:
runs-on: macos-13
name: iOS
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
USE_CCACHE: 1
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: iOS build
uses: ./.github/actions/build-ios
with:
node-version: '20.x'
js:
runs-on: ubuntu-latest
name: JavaScript
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint:js
package:
runs-on: macos-13
name: Package
env:
SDK_BUILD_CACHE_DIR: ${{ github.workspace }}/.native-modules
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
needs: [android, ios, js]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create version tag
run: |
PACKAGE_VERSION=$(sed -n 's/^ *"version": *"//p' package.json | tr -d '"' | tr -d ',' | tr -d '[[:space:]]')
TIMESTAMP=`date +'%Y%m%d%H%M%S'`
VTAG="${PACKAGE_VERSION}.v${TIMESTAMP}"
echo "vtag=${VTAG}" >> $GITHUB_ENV
- name: Package
uses: ./.github/actions/package
with:
node-version: '20.x'
java-version: '17'
vtag: ${{ env.vtag }}