2021-04-07 06:25:48 -05:00
|
|
|
name: Deploy to app stores
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [ created ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
deploy-google-play:
|
|
|
|
name: Deploy to google play
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 10
|
|
|
|
environment: google-play
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
|
|
|
|
- name: Decrypt keys
|
|
|
|
env:
|
|
|
|
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
|
|
|
SERVICES_ENCRYPT_KEY: ${{ secrets.SERVICES_ENCRYPT_KEY }}
|
|
|
|
run: |
|
|
|
|
gpg --yes --batch --passphrase=$SERVICES_ENCRYPT_KEY ./app/src/release/google-services.json.gpg
|
|
|
|
gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg
|
|
|
|
- name: Upload apk to google play
|
|
|
|
env:
|
2021-09-20 04:38:13 -05:00
|
|
|
PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }}
|
2021-04-07 06:25:48 -05:00
|
|
|
PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }}
|
|
|
|
PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }}
|
2021-09-20 04:38:13 -05:00
|
|
|
ANDROID_PUBLISHER_CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}
|
|
|
|
run: ./gradlew publishPlayReleaseApps -PenableFirebase --stacktrace;
|
2021-04-07 06:25:48 -05:00
|
|
|
|
|
|
|
deploy-app-gallery:
|
|
|
|
name: Deploy to AppGallery
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 10
|
|
|
|
environment: app-gallery
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
|
|
|
|
- name: Decrypt keys
|
|
|
|
env:
|
|
|
|
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
|
|
|
SERVICES_ENCRYPT_KEY: ${{ secrets.SERVICES_ENCRYPT_KEY }}
|
|
|
|
run: |
|
|
|
|
gpg --yes --batch --passphrase=$SERVICES_ENCRYPT_KEY ./app/src/release/agconnect-services.json.gpg
|
|
|
|
gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg
|
2021-05-02 06:49:28 -05:00
|
|
|
- name: Prepare credentials
|
|
|
|
env:
|
|
|
|
AGC_CREDENTIALS: ${{ secrets.AGC_CREDENTIALS }}
|
|
|
|
run: echo $AGC_CREDENTIALS > ./app/src/release/agconnect-credentials.json
|
|
|
|
- name: Build and publish HMS version
|
2021-04-07 06:25:48 -05:00
|
|
|
env:
|
2021-09-20 04:38:13 -05:00
|
|
|
PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }}
|
2021-04-07 06:25:48 -05:00
|
|
|
PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }}
|
|
|
|
PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }}
|
2021-09-05 20:27:54 -05:00
|
|
|
run: ./gradlew bundleHmsRelease --stacktrace && ./gradlew publishHuaweiAppGalleryHmsRelease --stacktrace
|