diff options
-rw-r--r-- | .github/workflows/deploy_snapshot.yml | 6 | ||||
-rw-r--r-- | app/build.gradle | 2 | ||||
-rwxr-xr-x | release/deploy-snapshot.sh | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml index 5b3b1cc4..621f12ef 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -51,7 +51,7 @@ jobs: run: ./gradlew dependencies - name: Build release app - run: ./gradlew :app:assembleFreeRelease + run: ./gradlew :app:assembleFreeRelease :app:assembleNonFreeRelease env: SNAPSHOT: "true" @@ -76,6 +76,8 @@ jobs: run: npm install -g cloudflare-cli - name: Purge Cloudflare cache - run: cfcli --token ${CF_TOKEN} purge "https://dl.msfjarvis.dev/APS/$(cd ./app/build/outputs/apk/release/; ls *.apk)" + run: | + cfcli --token ${CF_TOKEN} purge "https://dl.msfjarvis.dev/APS/$(cd ./app/build/outputs/apk/nonFree/release/; ls *.apk)" + cfcli --token ${CF_TOKEN} purge "https://dl.msfjarvis.dev/APS/$(cd ./app/build/outputs/apk/free/release/; ls *.apk)" env: CF_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} diff --git a/app/build.gradle b/app/build.gradle index 399402cb..7d77ece1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,7 +16,7 @@ android { if (isSnapshot()) { android.applicationVariants.all { final variant -> variant.outputs.all { - outputFileName = "aps_${defaultConfig.versionName}.apk" + outputFileName = "aps-${variant.getFlavorName()}_${defaultConfig.versionName}.apk" } } } diff --git a/release/deploy-snapshot.sh b/release/deploy-snapshot.sh index 3687ea46..6d9cfdbb 100755 --- a/release/deploy-snapshot.sh +++ b/release/deploy-snapshot.sh @@ -5,7 +5,9 @@ mkdir -p "$SSHDIR" echo "$ACTIONS_DEPLOY_KEY" > "$SSHDIR/key" chmod 600 "$SSHDIR/key" export SERVER_DEPLOY_STRING="$SSH_USERNAME@$SERVER_ADDRESS:$SERVER_DESTINATION" -cd "$GITHUB_WORKSPACE/app/build/outputs/apk/free/release" -rm output.json +mkdir -p "$GITHUB_WORKSPACE/APS" +cp -v "$GITHUB_WORKSPACE/app/build/outputs/apk/free/release/*.apk" "$GITHUB_WORKSPACE/APS" +cp -v "$GITHUB_WORKSPACE/app/build/outputs/apk/nonFree/release/*.apk" "$GITHUB_WORKSPACE/APS" +cd "$GITHUB_WORKSPACE/APS" rsync -ahvcr --omit-dir-times --progress --delete --no-o --no-g -e "ssh -i $SSHDIR/key -o StrictHostKeyChecking=no -p $SSH_PORT" . "$SERVER_DEPLOY_STRING" || exit 1 exit 0 |