Merge pull request #3031 from numbersprotocol/milestone-v230905 #23
Workflow file for this run
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: Build APKs | |
on: | |
push: | |
tags: | |
- 'android-*' | |
jobs: | |
build-apks-upload-google-drive: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- folder_name: test-storage-backend | |
storage_base_url: NUMBERS_STORAGE_QA_BASE_URL | |
storage_trusted_client_key: NUMBERS_STORAGE_QA_TRUSTED_CLIENT_KEY | |
bubble_iframe_url: NUMBERS_BUBBLE_IFRAME_URL | |
bubble_db_url: NUMBERS_BUBBLE_DB_URL # FIXME: rename to networ_action_url: NUMBERS_NETWORK_ACTION_URL | |
- folder_name: test-bubble-iframe | |
storage_base_url: NUMBERS_STORAGE_BASE_URL | |
storage_trusted_client_key: NUMBERS_STORAGE_TRUSTED_CLIENT_KEY | |
bubble_iframe_url: NUMBERS_BUBBLE_IFRAME_URL_QA_RELEASE | |
bubble_db_url: NUMBERS_BUBBLE_DB_URL # FIXME: rename to networ_action_url: NUMBERS_NETWORK_ACTION_URL | |
- folder_name: test-network-actions | |
storage_base_url: NUMBERS_STORAGE_BASE_URL | |
storage_trusted_client_key: NUMBERS_STORAGE_TRUSTED_CLIENT_KEY | |
bubble_iframe_url: NUMBERS_BUBBLE_IFRAME_URL | |
bubble_db_url: NUMBERS_BUBBLE_DB_QA_URL # FIXME: rename to networ_action_url: NUMBERS_NETWORK_ACTION_QA_URL | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.15.0' | |
- name: Check if version has been updated | |
id: version_check | |
uses: EndBug/version-check@v2 | |
with: | |
diff-search: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup rclone | |
env: | |
RCLONE_CONFIG_BASE64: ${{ secrets.RCLONE_CONFIG_BASE64 }} | |
run: | | |
curl https://rclone.org/install.sh | sudo bash | |
mkdir -p ~/.config/rclone | |
echo -n "$RCLONE_CONFIG_BASE64" | base64 -d > ~/.config/rclone/rclone.conf | |
rclone lsd gdrive:/ | |
- name: Build Ionic | |
env: | |
NUMBERS_STORAGE_BASE_URL: ${{ secrets[matrix.storage_base_url] }} | |
NUMBERS_STORAGE_TRUSTED_CLIENT_KEY: ${{ secrets[matrix.storage_trusted_client_key] }} | |
NUMBERS_BUBBLE_IFRAME_URL: ${{ secrets[matrix.bubble_iframe_url] }} | |
NUMBERS_BUBBLE_DB_URL: ${{ secrets[matrix.bubble_db_url] }} | |
BUBBLE_API_URL: ${{ secrets.BUBBLE_API_URL}} # FIXME: remove BUBBLE_API_URL, not used in capture app. | |
APPS_FLYER_DEV_KEY: '' # Empty string prevents apps flyer SDK initialization for non-public flavors. | |
NUMBERS_PQINA_NPM_KEY: ${{ secrets.NUMBERS_PQINA_NPM_KEY }} # same for public, non-public flavors. | |
PIPEDREAM_DELETE_CAPTURE_ACCOUNT: ${{ secrets.PIPEDREAM_DELETE_CAPTURE_ACCOUNT }} | |
run: | | |
npm run preconfig.npmrc | |
npm install -g @ionic/cli | |
npm install | |
npm run build | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' # https://github.com/actions/setup-java#supported-distributions | |
java-version: '17' | |
- name: Build APKs | |
run: | | |
npx cap sync android | |
cd android/ | |
./gradlew assembleDebug | |
- name: Upload matrix build outputs to Google Drive | |
run: | | |
rclone copy ./android/app/build/outputs/apk/debug/ gdrive:/${{github.ref_name}}/${{ matrix.folder_name }}/ |