|
|
@@ -197,4 +197,59 @@ jobs:
|
|
|
wait $job || exit 1
|
|
|
done
|
|
|
}
|
|
|
- upload apks/*.apk
|
|
|
+ upload apks/*.apk
|
|
|
+ play:
|
|
|
+ name: Publish to Play Store
|
|
|
+ if: github.event.inputs.upload != 'y'
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ needs:
|
|
|
+ - v2ray
|
|
|
+ - shadowsocks
|
|
|
+ - shadowsocksr
|
|
|
+ steps:
|
|
|
+ - name: Checkout
|
|
|
+ uses: actions/checkout@v2
|
|
|
+ - name: Setup Android SDK Tools
|
|
|
+ uses: android-actions/setup-android@v2
|
|
|
+ - name: Fetch Status
|
|
|
+ run: |
|
|
|
+ git submodule status 'shadowsocks/*' > shadowsocks_status
|
|
|
+ git submodule status 'shadowsocksr/*' > shadowsocksr_status
|
|
|
+ git submodule status v2ray > v2ray_status
|
|
|
+ - name: V2Ray Cache
|
|
|
+ uses: actions/cache@v2
|
|
|
+ with:
|
|
|
+ path: |
|
|
|
+ app/libs/libv2ray.aar
|
|
|
+ key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
|
|
+ - name: Shadowsocks Cache
|
|
|
+ uses: actions/cache@v2
|
|
|
+ with:
|
|
|
+ path: |
|
|
|
+ app/libs/shadowsocks-release.aar
|
|
|
+ key: ${{ hashFiles('shadowsocks_status') }}
|
|
|
+ - name: ShadowsocksR Cache
|
|
|
+ uses: actions/cache@v2
|
|
|
+ with:
|
|
|
+ path: |
|
|
|
+ app/libs/shadowsocksr-release.aar
|
|
|
+ key: ${{ hashFiles('shadowsocksr_status') }}
|
|
|
+ - name: Gradle cache
|
|
|
+ uses: actions/cache@v2
|
|
|
+ with:
|
|
|
+ path: ~/.gradle
|
|
|
+ key: gradle-${{ hashFiles('**/*.gradle') }}
|
|
|
+ - name: Checkout Library
|
|
|
+ run: |
|
|
|
+ git submodule update --init 'app/*'
|
|
|
+ - name: Debug Build
|
|
|
+ run: |
|
|
|
+ echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
|
|
+ echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
|
|
|
+ export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
|
|
+ ./run update_assets
|
|
|
+ cat > service_account_credentials.json << EOF
|
|
|
+ ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}"
|
|
|
+ EOF
|
|
|
+ ./gradlew app:publishRelease
|
|
|
+ echo "APK=$APK" >> $GITHUB_ENV
|