Deploy both variants to snapshot directory (#914)
* Deploy both free and non-free variants Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * build: add product flavor to APK name Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
ca9c951a53
commit
9fb492b572
3 changed files with 9 additions and 5 deletions
6
.github/workflows/deploy_snapshot.yml
vendored
6
.github/workflows/deploy_snapshot.yml
vendored
|
@ -51,7 +51,7 @@ jobs:
|
||||||
run: ./gradlew dependencies
|
run: ./gradlew dependencies
|
||||||
|
|
||||||
- name: Build release app
|
- name: Build release app
|
||||||
run: ./gradlew :app:assembleFreeRelease
|
run: ./gradlew :app:assembleFreeRelease :app:assembleNonFreeRelease
|
||||||
env:
|
env:
|
||||||
SNAPSHOT: "true"
|
SNAPSHOT: "true"
|
||||||
|
|
||||||
|
@ -76,6 +76,8 @@ jobs:
|
||||||
run: npm install -g cloudflare-cli
|
run: npm install -g cloudflare-cli
|
||||||
|
|
||||||
- name: Purge Cloudflare cache
|
- 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:
|
env:
|
||||||
CF_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
CF_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
|
|
@ -16,7 +16,7 @@ android {
|
||||||
if (isSnapshot()) {
|
if (isSnapshot()) {
|
||||||
android.applicationVariants.all { final variant ->
|
android.applicationVariants.all { final variant ->
|
||||||
variant.outputs.all {
|
variant.outputs.all {
|
||||||
outputFileName = "aps_${defaultConfig.versionName}.apk"
|
outputFileName = "aps-${variant.getFlavorName()}_${defaultConfig.versionName}.apk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,9 @@ mkdir -p "$SSHDIR"
|
||||||
echo "$ACTIONS_DEPLOY_KEY" > "$SSHDIR/key"
|
echo "$ACTIONS_DEPLOY_KEY" > "$SSHDIR/key"
|
||||||
chmod 600 "$SSHDIR/key"
|
chmod 600 "$SSHDIR/key"
|
||||||
export SERVER_DEPLOY_STRING="$SSH_USERNAME@$SERVER_ADDRESS:$SERVER_DESTINATION"
|
export SERVER_DEPLOY_STRING="$SSH_USERNAME@$SERVER_ADDRESS:$SERVER_DESTINATION"
|
||||||
cd "$GITHUB_WORKSPACE/app/build/outputs/apk/free/release"
|
mkdir -p "$GITHUB_WORKSPACE/APS"
|
||||||
rm output.json
|
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
|
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
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue