forked from github/wulkanowy-mirror
Add deploy to AppGallery github actions config (#1259)
This commit is contained in:
parent
c70fe3430c
commit
6e19eb943d
38
.github/workflows/test.yml
vendored
38
.github/workflows/test.yml
vendored
@ -69,6 +69,44 @@ jobs:
|
||||
PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }}
|
||||
run: ./gradlew publishPlayRelease -PenableFirebase --stacktrace;
|
||||
|
||||
deploy-app-gallery:
|
||||
name: Deploy to AppGallery
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
environment: app-gallery
|
||||
needs: [ unit-tests ]
|
||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||
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/key.p12.gpg
|
||||
gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg
|
||||
- name: Build HMS version
|
||||
env:
|
||||
PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }}
|
||||
PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }}
|
||||
PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }}
|
||||
run: ./gradlew assembleHmsRelease --stacktrace
|
||||
- name: Upload APK to AppGallery
|
||||
env:
|
||||
AGC_CLIENT_ID: ${{ secrets.AGC_CLIENT_ID }}
|
||||
AGC_CLIENT_SECRET: ${{ secrets.AGC_CLIENT_SECRET }}
|
||||
run: ./gradlew publishHuaweiAppGalleryHmsRelease --stacktrace;
|
||||
|
||||
deploy-appcenter:
|
||||
name: Deploy to App Center
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -4,6 +4,7 @@ apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'dagger.hilt.android.plugin'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'com.github.triplet.play'
|
||||
apply plugin: 'ru.cian.huawei-publish'
|
||||
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.huawei.agconnect'
|
||||
@ -140,6 +141,17 @@ play {
|
||||
updatePriority = 3
|
||||
}
|
||||
|
||||
huaweiPublish {
|
||||
instances {
|
||||
hmsRelease {
|
||||
clientId = System.getenv("AGC_CLIENT_ID")
|
||||
clientSecret = System.getenv("AGC_CLIENT_SECRET")
|
||||
buildFormat = "apk"
|
||||
deployType = "draft"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ext {
|
||||
work_manager = "2.5.0"
|
||||
work_hilt = "1.0.0-beta01"
|
||||
|
@ -19,6 +19,7 @@ buildscript {
|
||||
classpath 'com.huawei.agconnect:agcp:1.5.1.200'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.1'
|
||||
classpath "com.github.triplet.gradle:play-publisher:2.8.0"
|
||||
classpath "ru.cian:huawei-publish-gradle-plugin:1.2.2"
|
||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.1.1"
|
||||
classpath "gradle.plugin.com.star-zero.gradle:githook:1.2.0"
|
||||
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libraries"
|
||||
|
Loading…
Reference in New Issue
Block a user