-
-
Notifications
You must be signed in to change notification settings - Fork 90
64 lines (53 loc) · 1.49 KB
/
ios.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
name: iOS Build
on:
push:
paths-ignore:
- 'android/**'
- 'apidoc/**'
pull_request:
paths-ignore:
- 'android/**'
- 'apidoc/**'
workflow_dispatch:
jobs:
ios:
runs-on: macos-latest
name: iOS
env:
SDK_VERSION: 12.3.0.GA
MODULE_ID: ti.barcode
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Cache Node.js modules
id: node-cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-modules-
${{ runner.OS }}-
- run: npm ci
name: Install dependencies
if: steps.node-cache.outputs.cache-hit != 'true'
- run: npm run lint:ios
name: Lint
- run: npm i -g titanium
name: Install Titanium CLI
# TODO cache SDK install
- run: ti sdk install ${{ env.SDK_VERSION }} --force
name: Install Titanium SDK
- run: sed -i .bak 's/TITANIUM_SDK_VERSION = .*/TITANIUM_SDK_VERSION = ${{ env.SDK_VERSION }}/' ios/titanium.xcconfig
name: Set to Build with newly installed SDK
- run: npm run test:ios -- --sdkVersion ${{ env.SDK_VERSION }}
name: Build and Test
- name: Archive iOS artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.MODULE_ID }}-ios
path: |
ios/dist/${{ env.MODULE_ID }}-iphone-*.zip