-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (47 loc) · 2.36 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
name: build
on:
push:
branches:
- develop
- master
- release/*
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
jobs:
buildnrun:
name: Integrate and build demo app
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Setup Cordova tools
run: npm install -g cordova
- name: Prepare Config
working-directory: ./demoapp
run: npm i && npm --sUserName=${{ secrets.S_USERNAME }} --sPassword=${{ secrets.S_PASSWORD }} --sPubKey=${{ secrets.S_PUBKEY }} --m2UserName=${{ secrets.M_USERNAME }} --m2Password=${{ secrets.M_PASSWORD }} --m2Url=${{ secrets.M_URL }} --sUserNameApple=${{ secrets.S_USERNAME_APPLE }} --sPasswordApple=${{ secrets.S_PASSWORD_APPLE }} --sPubKeyApple=${{ secrets.S_PUBKEY_APPLE }} --afUserName=${{ secrets.AF_USERNAME }} --afPassword=${{ secrets.AF_PASSWORD }} --afUrl=${{ secrets.AF_URL }} run prepareConfig
- name: Pack plugin
run: npm pack | xargs tar zxvf
- name: Install plugin
working-directory: ./demoapp
run: cordova plugin add ../package
- name: Build Android
working-directory: ./demoapp
run: npm run addAndroid && npm run buildAndroid
- name: Integrate into demo app and run it
uses: reactivecircus/android-emulator-runner@v2
if: false # the action it unstable on linux runners, using mac is too expensive, will try to check later
with:
api-level: 29
# add "&& npm run prepareAndRunOnIosEmulator" later when resolved
script: pushd demoapp && npm i && npm --sUserName=${{ secrets.S_USERNAME }} --sPassword=${{ secrets.S_PASSWORD }} --sPubKey=${{ secrets.S_PUBKEY }} --m2UserName=${{ secrets.M_USERNAME }} --m2Password=${{ secrets.M_PASSWORD }} --m2Url=${{ secrets.M_URL }} --sUserNameApple=${{ secrets.S_USERNAME_APPLE }} --sPasswordApple=${{ secrets.S_PASSWORD_APPLE }} --sPubKeyApple=${{ secrets.S_PUBKEY_APPLE }} --afUserName=${{ secrets.AF_USERNAME }} --afPassword=${{ secrets.AF_PASSWORD }} --afUrl=${{ secrets.AF_URL }} run prepareConfig && npm run prepareAndRunOnEmulator
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}