forked from ita-social-projects/Car-Front-End
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 2.41 KB
/
ArtifactGenerator.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
name: Build Android and iOS
on:
push:
branches: [ develop ]
jobs:
android_app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install npm dependencies
run: |
cd Car
npm install
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build RELEASE APK
run: cd Car/android && bash ./gradlew assembleRelease --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: car-app-android.v1.0.${{ github.run_number }}.apk
path: /home/runner/work/Car-Front-End/Car-Front-End/Car/android/app/build/outputs/apk/release/
ios_app:
#this build is only for simulator!
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install npm dependencies
run: |
cd Car
npm install
- name: Build app for using only in simulator
run: |
cd Car/ios
xcodebuild CODE_SIGNING_ALLOWED="NO" CODE_SIGN_IDENTITY="" -workspace Car.xcworkspace -scheme Car -sdk "iphonesimulator" -destination "generic/platform=iOS Simulator" -configuration Release archive -archivePath $PWD/build/car.xcarchive
#Than u will have devaccount or certificate for Ad-hoc deployment use this command instead of command which is above
# xcodebuild -workspace Car.xcworkspace -scheme Car -sdk "iphoneos" -destination "generic/platform=iOS" -configuration Release archive -archivePath $PWD/build/car.xcarchive
#After that use command for creating ipa from xcarchive (u will have to create exportOptions.plist file (read about it in the internet)):
# xcodebuild -exportArchive -archivePath $PWD/build/SoftServeCarMobile.xcarchive -exportOptionsPlist exportOptions.plist -exportPath $PWD/build
#Since u can't open .xcarchive via terminal u have to change it's extension
- name: Simualtor app extraction from xcarchive
run: |
cd Car/ios/build/
mv car.xcarchive car
- name: Upload App
uses: actions/upload-artifact@v1
# then u will be able and create ipa file use next commands in this action instead of below commands
# name: car.v1.0.${{ github.run_number }}.ipa
# path: Car/ios/
with:
name: car-simulator-ios.v1.0.${{ github.run_number }}.app
path: Car/ios/build/car/Products/Applications/