Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [Sync] New release to alpha channel #656

Merged
merged 18 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# encrypted files/folders
env/** filter=git-crypt diff=git-crypt
.env filter=git-crypt diff=git-crypt
ios/devices.txt filter=git-crypt diff=git-crypt
android/app/src/main/res/values/Intercom.xml filter=git-crypt diff=git-crypt
ios/atb/Intercom.plist filter=git-crypt diff=git-crypt
android/app/google-services.json filter=git-crypt diff=git-crypt
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/build-staging-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build staging Android project
on:
push:
branches:
- master

jobs:
build-ios:
name: Build Android
timeout-minutes: 60
runs-on: macos-latest
steps:
- name: Checkout project
uses: actions/checkout@v1
- name: Set global env vars
run: |
echo "BUILD_ID=$(date +%s)" >> $GITHUB_ENV
echo "APP_ENVIRONMENT=staging" >> $GITHUB_ENV
- name: Decrypt env files
run: sh ./scripts/git-crypt-unlock.sh
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- name: install node v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Get potential cached node_modules
uses: actions/cache@v2
id: modules-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/patches/**.patch') }}
- name: Install node_modules
if: steps.modules-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Bundle install, fastlane dependencies
run: bundle install
- name: Set environment
run: sh ./scripts/override-environment.sh $APP_ENVIRONMENT
- name: Override native config files
run: sh ./scripts/override-config-files.sh
- name: Get potential cached APK
uses: actions/cache@v2
id: apk-cache
with:
path: 'app-staging.apk'
key: ${{ runner.os }}-android-cache-${{ hashFiles('android/**') }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/patches/**.patch') }}
- name: Get Android keystore
run: sh ./scripts/android/create-keystore-file.sh
env:
GPG_KEYSTORE_FILE: ${{ secrets.GPG_KEYSTORE_FILE }}
GPG_KEYSTORE_PASS: ${{ secrets.GPG_KEYSTORE_PASS }}
- name: Generate icons
if: steps.apk-cache.outputs.cache-hit != 'true'
run: brew install imagemagick && yarn app-icon generate -i icon.qa.png --platforms=android --rounded none && yarn app-icon generate -i icon.qa.round.png --platforms=android --rounded only
- name: Run fastlane build
if: steps.apk-cache.outputs.cache-hit != 'true'
run: yarn build:android
env:
KEYSTORE_PASS: ${{ secrets.ATB_KEYSTORE_PASS }}
KEY_PASS: ${{ secrets.ATB_KEY_PASS }}
KEY_ALIAS: ${{ secrets.ATB_KEY_ALIAS }}
- name: Replace apk bundle
if: steps.apk-cache.outputs.cache-hit == 'true'
run: sh ./scripts/android/replace-bundle.sh
env:
APK_FILE_NAME: app-staging.apk
KEYSTORE_FILE: keystore.jks
KEYSTORE_PASS: ${{ secrets.ATB_KEYSTORE_PASS }}
KEY_PASS: ${{ secrets.ATB_KEY_PASS }}
KEY_ALIAS: ${{ secrets.ATB_KEY_ALIAS }}
- name: Distribute to AppCenter
run: yarn appcenter:android
env:
APPCENTER_API_KEY: ${{ secrets.APPCENTER_ANDROID_API_KEY }}
- name: Upload bundle and source maps
run: sh ./scripts/android/upload-sourcemaps.sh
env:
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
84 changes: 84 additions & 0 deletions .github/workflows/build-staging-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Build staging iOS project
on:
push:
branches:
- master

jobs:
build-ios:
name: Build iOS
timeout-minutes: 60
runs-on: macos-latest
steps:
- name: Checkout project
uses: actions/checkout@v1
- name: Set global env vars
run: |
echo "BUILD_ID=$(date +%s)" >> $GITHUB_ENV
echo "APP_ENVIRONMENT=staging" >> $GITHUB_ENV
- name: Decrypt env files
run: sh ./scripts/git-crypt-unlock.sh
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- name: install node v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Get potential cached node_modules
uses: actions/cache@v2
id: modules-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/patches/**.patch') }}
- name: Install node_modules
if: steps.modules-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Bundle Install
run: bundle install
- name: Set environment
run: sh ./scripts/override-environment.sh $APP_ENVIRONMENT
- name: Override native config files
run: sh ./scripts/override-config-files.sh
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}
- name: Get potential cached ipa
uses: actions/cache@v2
id: ipa-cache
with:
path: 'AtB.ipa'
key: ${{ runner.os }}-ios-cache-${{ hashFiles('ios/**') }}
- name: Run fastlane cert match
run: yarn cert:ios
env:
FASTLANE_MATCH_URL: ${{ secrets.FASTLANE_MATCH_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
- name: Generate icons
if: steps.ipa-cache.outputs.cache-hit != 'true'
run: brew install imagemagick && yarn app-icon generate -i icon.qa.png --platforms=ios
- name: Run fastlane build
if: steps.ipa-cache.outputs.cache-hit != 'true'
run: yarn build:ios
- name: Replace ipa bundle
if: steps.ipa-cache.outputs.cache-hit == 'true'
run: sh ./scripts/ios/replace-bundle.sh
env:
IPA_FILE_NAME: 'AtB.ipa'
APP_NAME: 'AtB.app'
CODE_SIGN_IDENTITY: ${{ secrets.IOS_CODE_SIGN_IDENTITY }}
- name: Distribute to AppCenter
run: yarn appcenter:ios
env:
APPCENTER_API_KEY: ${{ secrets.APPCENTER_IOS_API_KEY }}
- name: Create bundle and source maps
if: steps.ipa-cache.outputs.cache-hit != 'true'
run: sh ./scripts/ios/create-sourcemaps.sh
- name: Upload bundle and source maps
run: sh ./scripts/ios/upload-sourcemaps.sh
env:
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
- name: Upload dSYMs
if: steps.ipa-cache.outputs.cache-hit != 'true'
run: sh ./scripts/ios/upload-dsyms.sh
env:
BUGSNAG_API_KEY: ${{ secrets.BUGSNAG_API_KEY }}
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "fastlane"
gem "cocoapods"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
Loading