1
0
Fork 1
monocles_chat_clean/.builds/debian-stable.yml

60 lines
2.4 KiB
YAML
Raw Permalink Normal View History

2024-08-31 20:41:31 +02:00
image: debian/stable
sources:
- https://codeberg.org/monocles/monocles_chat
2024-08-31 20:41:31 +02:00
artifacts:
- monocleschat.apk
- monocleschat_google_play.apk
- monocleschat_google_play.aab
2024-08-31 20:41:31 +02:00
packages:
- wget
- unzip
- openjdk-17-jdk-headless
- android-sdk
secrets:
- 6b782fde-a43b-4988-b102-38fa541bb788
- 7eed327c-05c7-49b4-baed-a4d8785588d5
- b1f1df57-d41c-45d9-9684-b66d3fa8d063
- b412b263-bdde-410b-997e-6326aba90132
environment:
ANDROID_SDK_ROOT: /home/build/android
SENTRY_ORG: mboa
SENTRY_PROJECT: android
tasks:
- sdk: |
wget -qO android.zip https://dl.google.com/android/repository/commandlinetools-linux-6987402_latest.zip
unzip -qq android.zip
mkdir -p android/cmdline-tools
mv cmdline-tools android/cmdline-tools/tools
echo y | android/cmdline-tools/tools/bin/sdkmanager "platforms;android-29"
echo y | android/cmdline-tools/tools/bin/sdkmanager "platform-tools"
echo y | android/cmdline-tools/tools/bin/sdkmanager "build-tools;29.0.2"
touch ~/.android/repositories.cfg
yes | android/cmdline-tools/tools/bin/sdkmanager --licenses
- sentry: |
cd monocles_chat
sed -ie 's/<!-- INSERT -->/<meta-data android:name="io.sentry.dsn" android:value="https:\/\/ef8be0f096894172885533d912826e3e@app.glitchtip.com\/5857" \/>/' src/monocleschat/AndroidManifest.xml
2024-08-31 20:41:31 +02:00
sed -ie 's/\/\/ PLUGIN INSERT/id "io.sentry.android.gradle" version "4.2.0"/' build.gradle
sed -ie 's/\/\/ ROOT INSERT/sentry { includeSourceContext = true }/' build.gradle
- build_free: |
set +x
export SENTRY_AUTH_TOKEN=$(cat ~/sentry_auth_token)
set -x
cd monocles_chat
./gradlew assemblemonocleschatFreeDebug
2024-08-31 20:41:31 +02:00
- build_google_play: |
set +x
export SENTRY_AUTH_TOKEN=$(cat ~/sentry_auth_token)
set -x
cd monocles_chat
2024-08-31 20:41:31 +02:00
mkdir -p src/playstore/res/values/
mv ~/push.xml src/playstore/res/values/
./gradlew assemblemonocleschatPlaystoreDebug
echo keystore=$HOME/.android/monocleschat.keystore > signing.properties
echo keystore.password=monocleschat >> signing.properties
echo keystore.alias=monocleschat >> signing.properties
./gradlew bundlemonocleschatPlaystoreRelease
2024-08-31 20:41:31 +02:00
- assets: |
mv monocles_chat/build/outputs/apk/monocleschatFree/debug/*universal*.apk monocleschat.apk
mv monocles_chat/build/outputs/apk/monocleschatPlaystore/debug/*universal*.apk monocleschat_google_play.apk
mv monocles_chat/build/outputs/bundle/monocleschatPlaystoreRelease/*.aab monocleschat_google_play.aab