Skip to content

Commit f20bb41

Browse files
committed
first step
1 parent efcf5cb commit f20bb41

File tree

7 files changed

+2443
-35
lines changed

7 files changed

+2443
-35
lines changed

.github/workflows/android-cicd.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Android Build ## name of the workflow
2+
3+
on:
4+
workflow_dispatch: # To trigger manual build
5+
release:
6+
types: [published] # only run the workflow when a new release has been published
7+
8+
jobs:
9+
android-build:
10+
name: Android Build
11+
runs-on: ubuntu-latest # using ubuntu latest version / or you can use a specific version
12+
13+
steps:
14+
- name: Check out Git repository # clone the repo to local ci workspace
15+
uses: actions/checkout@v2
16+
17+
- name: Set up our JDK environment # setup JDK environment: mandatory as we need to build android project
18+
uses: actions/setup-java@v1.4.3
19+
with:
20+
java-version: 1.8
21+
22+
- name: Get yarn cache directory path
23+
id: yarn-cache-dir-path
24+
run: echo "::set-output name=dir::$(yarn cache dir)"
25+
- name: Restore node_modules from cache
26+
uses: actions/cache@v2
27+
id: yarn-cache
28+
with:
29+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-yarn-
33+
34+
- name: Install dependencies # install project deps with --frozen-lockfile to make sure we will have the same packages version ( very recommended on running yarn install on ci)
35+
run: yarn install --frozen-lockfile
36+
37+
## configure cash for gradle : will help to reduce build time
38+
- name: Cache Gradle Wrapper
39+
uses: actions/cache@v2
40+
with:
41+
path: ~/.gradle/wrapper
42+
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
43+
44+
- name: Cache Gradle Dependencies
45+
uses: actions/cache@v2
46+
with:
47+
path: ~/.gradle/caches
48+
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
49+
restore-keys: |
50+
${{ runner.os }}-gradle-caches-
51+
- name: Make Gradlew Executable
52+
run: cd android && chmod +x ./gradlew
53+
54+
- name: Generate App APK
55+
run: |
56+
cd android && ./gradlew assembleRelease --no-daemon
57+
58+
## sign generated apk
59+
- name: Sign APK
60+
id: sign_app
61+
uses: r0adkll/sign-android-release@v1
62+
with:
63+
releaseDirectory: android/app/build/outputs/apk/release
64+
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
65+
alias: ${{ secrets.ANDROID_ALIAS }}
66+
keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
67+
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
68+
69+
## Distribute app to Firebase App Distribution for testing / use google play internal track if you have a google play account
70+
- name: upload artifact to Firebase App Distribution
71+
uses: wzieba/Firebase-Distribution-Github-Action@v1
72+
with:
73+
appId: ${{secrets.ANDROID_FIREBASE_APP_ID}}
74+
token: ${{secrets.ANDROID_FIREBASE_TOKEN}}
75+
groups: testers
76+
file: ${{steps.sign_app.outputs.signedReleaseFile}}

docs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
keytool -genkeypair -v -storetype PKCS12 -keystore release.keystore -alias release -keyalg RSA -keysize 2048 -validity 10000
2+
pass=123456

ios/AwesomeProject.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@
564564
COPY_PHASE_STRIP = NO;
565565
ENABLE_STRICT_OBJC_MSGSEND = YES;
566566
ENABLE_TESTABILITY = YES;
567-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
567+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
568568
GCC_C_LANGUAGE_STANDARD = gnu99;
569569
GCC_DYNAMIC_NO_PIC = NO;
570570
GCC_NO_COMMON_BLOCKS = YES;
@@ -598,6 +598,7 @@
598598
"-DFOLLY_MOBILE=1",
599599
"-DFOLLY_USE_LIBCPP=1",
600600
);
601+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
601602
SDKROOT = iphoneos;
602603
};
603604
name = Debug;
@@ -635,7 +636,7 @@
635636
COPY_PHASE_STRIP = YES;
636637
ENABLE_NS_ASSERTIONS = NO;
637638
ENABLE_STRICT_OBJC_MSGSEND = YES;
638-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
639+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
639640
GCC_C_LANGUAGE_STANDARD = gnu99;
640641
GCC_NO_COMMON_BLOCKS = YES;
641642
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -661,6 +662,7 @@
661662
"-DFOLLY_MOBILE=1",
662663
"-DFOLLY_USE_LIBCPP=1",
663664
);
665+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
664666
SDKROOT = iphoneos;
665667
VALIDATE_PRODUCT = YES;
666668
};

ios/AwesomeProject.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)