create gitea releases

This commit is contained in:
Alya Sirko 2022-09-02 16:28:51 +03:00
parent 6debead430
commit ce5d779370

View file

@ -6,7 +6,7 @@ steps:
- name: Build Debug Artifacts
commands:
- flutter build apk --debug --split-per-abi
- mv build/app/outputs/flutter-apk/*-debug.apk `pwd`
- mv build/app/outputs/flutter-apk/*-debug.apk .
- rename app pro.kherel.selfprivacy *.apk && rename debug "$DRONE_COMMIT" *.apk
- ls *.apk
@ -34,7 +34,7 @@ steps:
- eval `ssh-agent -s`
- echo "$SSH_PRIVATE_KEY" | ssh-add -
# Copy sources to the building environment
- scp -r `pwd` builder@isolated:/var/lib/builder
- scp -r `pwd` builder@isolated:~
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
@ -47,7 +47,7 @@ steps:
# Build intermediate release artifact
- ssh builder@isolated "cd src && flutter build apk --release"
# Fetch the release artifact
- scp builder@isolated:/var/lib/builder/src/build/app/outputs/flutter-apk/app-release.apk `pwd`
- scp builder@isolated:src/build/app/outputs/flutter-apk/app-release.apk .
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
@ -60,11 +60,11 @@ steps:
- eval `ssh-agent -s`
- echo "$SSH_PRIVATE_KEY" | ssh-add -
# Upload and sign the artifact
- scp app-release.apk builder@isolated:/var/lib/builder
- scp app-release.apk builder@isolated:~
- ssh builder@isolated "zipalign -f -v 4 app-release.apk standalone_app-release.apk && apksigner sign --ks /run/secrets/standalone-keystore --ks-key-alias standalone --ks-pass file:/run/secrets/standalone-keystore-pass standalone_app-release.apk"
# Fetch the signed artifact
- scp builder@isolated:/var/lib/builder/standalone_app-release.apk `pwd`/standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk"
- scp builder@isolated:/var/lib/builder/standalone_app-release.apk.idsig `pwd`/standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk.idsig"
- scp builder@isolated:standalone_app-release.apk standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk
- scp builder@isolated:standalone_app-release.apk.idsig standalone_pro.kherel.selfprivacy_"$APP_BUILD_ID".apk.idsig
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
@ -77,9 +77,9 @@ steps:
- eval `ssh-agent -s`
- echo "$SSH_PRIVATE_KEY" | ssh-add -
# Upload and sign the artifact
- scp app-release.apk fdroid@isolated:/var/lib/fdroid/unsigned/pro.kherel.selfprivacy_"$APP_BUILD_ID".apk
- scp app-release.apk fdroid@isolated:unsigned/pro.kherel.selfprivacy_"$APP_BUILD_ID".apk
- ssh fdroid@isolated 'export FDROID_KEY_STORE_PASS=`cat /run/secrets/fdroid-keystore-pass` && fdroid publish && fdroid update'
- scp -r fdroid@isolated:/var/lib/fdroid/repo `pwd`
- scp -r fdroid@isolated:repo .
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY