Update ios.yml #661
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android Build | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: | |
- Development | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
test: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- uses: actions/setup-node@master | |
with: | |
node-version: '21.2.0' | |
# node-version: '14.16.0' | |
# - uses: c-hive/gha-yarn-cache@v1 | |
- name: Cache (NDK) | |
uses: actions/cache@v1 | |
with: | |
path: ${ANDROID_HOME}/ndk/21.0.6113669 | |
key: ndk-cache | |
#- name: Install NDK | |
# run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;21.0.6113669' | |
- name: Install node modules | |
run: | | |
npm install | |
# --legacy-deps=true | |
# - name: Lint | |
# uses: Krizzu/[email protected] | |
# with: | |
# ghToken: ${{ secrets.GITHUB_TOKEN }} | |
# eslintFiles: "app" | |
# eslintConfig: ".eslintrc.json" | |
#eslintExt: "js, jsx, ts, tsx" | |
- name: 'Create env file' | |
run: | | |
touch .env | |
echo apiUrlDevelop=${{ secrets.APIURLDEVELOP }} >> .env | |
echo facebookAppDisplayName=${{ secrets.FACEBOOKAPPDISPLAYNAME }} >> .env | |
echo facebookAppId=${{ secrets.FACEBOOKAPPID }} >> .env | |
echo facebookClientToken=${{ secrets.FACEBOOKCLIENTTOKEN }} >> .env | |
echo projectNumber=${{ secrets.PROJECTNUMBER }} >> .env | |
echo clientIdKey=${{ secrets.CLIENTIDKEY }} >> .env | |
echo encryptionsKey=${{ secrets.ENCRYPTIONS_KEY }} >> .env | |
echo encryptionsIVKey=${{ secrets.ENCRYPTIONS_IV_KEY }} >> .env | |
cat .env | |
- name: Create file | |
run: cat /home/runner/work/parenting-app-bebbo-mobile/parenting-app-bebbo-mobile/android/app/src/prodstaging/google-services.json | base64 | |
- name: Putting data | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo $DATA > /home/runner/work/parenting-app-bebbo-mobile/parenting-app-bebbo-mobile/android/app/src/prodstaging/google-services.json | |
- name: Decode keystore and create keystore and properties file for signing the app | |
run: | | |
echo "$MYAPP_UPLOAD_STORE_FILE" | base64 --decode > app/bebborelease.keystore | |
echo "storeFile=bebborelease.keystore" >> key.properties | |
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties | |
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties | |
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties | |
env: | |
MYAPP_UPLOAD_STORE_FILE: ${{ secrets.ANDROID_SIGNING_KEY }} | |
MYAPP_UPLOAD_KEY_ALIAS: ${{ secrets.ANDROID_ALIAS }} | |
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} | |
working-directory: android | |
- name: Cache Gradle Wrapper | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Cache Gradle Dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Make Gradlew Executable | |
run: cd android && chmod +x ./gradlew | |
- name: build prod | |
run: cd android && ./gradlew clean && ./gradlew assembleprodstagingRelease | |
#run: cd android && ./gradlew clean && ./gradlew wrapper && --gradle-version 8.0.1 && ./gradlew assembleprodstagingRelease --no-daemon | |
# run: cd android && ./gradlew clean && ./gradlew assembleprodstagingRelease --no-daemon | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Bebbo_Release.apk | |
path: android/app/build/outputs/apk/ |