Infinity-For-Lemmy/.woodpecker/nightly.yaml

77 lines
2.4 KiB
YAML
Raw Permalink Normal View History

clone:
git:
image: woodpeckerci/plugin-git
settings:
partial: false
2023-08-13 21:39:19 +02:00
steps:
build:
2024-08-29 14:20:42 +02:00
image: alvrme/alpine-android:android-34-jdk17
2023-08-13 21:39:19 +02:00
commands:
- apk add --no-cache python3
2023-08-13 21:39:19 +02:00
- ./gradlew :app:assembleNightly
sign:
2024-08-29 14:20:42 +02:00
image: alvrme/alpine-android:android-34-jdk17
commands:
2023-08-13 21:52:52 +02:00
- ./scripts/apk-sign.sh eu.toldi.infinityforlemmy.nightly.apk app/build/outputs/apk/nightly/eu.toldi.infinityforlemmy.nightly.apk
secrets: [ APK_KS_PASS, APK_KS, APK_KS_ALIAS ]
pull-repo-config:
image: codeberg.org/freeyourgadget/android-fdroid-tools:latest
commands:
- cd ..
- pwd
- mkdir repoconfig
- cd repoconfig
- pwd
- git clone --depth 1 https://codeberg.org/Bazsalanszky/fdroid-repo-config
2023-08-22 21:50:48 +02:00
- cp /woodpecker/src/codeberg.org/Bazsalanszky/Eternity/eu.toldi.infinityforlemmy.nightly.apk fdroid-repo-config/repo/
pull-pages:
image: codeberg.org/freeyourgadget/android-fdroid-tools:latest
commands:
- cd ..
- pwd
- mkdir pages
- cd pages
- pwd
- git clone --depth 2 https://codeberg.org/Bazsalanszky/pages
- cd pages
- git config user.name "CODEBERG CI"
- git config user.email "noreply@nodomain.nodomain"
# reset and remove, later force push, to keep repo size small
- git reset --soft HEAD~1
- git status
2023-08-13 22:04:25 +02:00
update-fdroid-data:
image: cs8898/android-fdroid-sdk:33.0.0
2023-08-13 22:04:25 +02:00
commands:
- pwd
- cd ../repoconfig/fdroid-repo-config/
2023-08-14 10:35:05 +02:00
- echo -n "$${FDROID_KS}" | base64 -d > keystore.p12
2023-08-14 10:16:48 +02:00
- cat keystore.p12 | sha256sum
2023-08-14 10:39:36 +02:00
- sed -i "s|KS_PASS|$${FDROID_KS_PASS}|g" config.yml
- sed -i "s|KEY_PASS|$${FDROID_KEY_PASS}|g" config.yml
2023-08-13 22:04:25 +02:00
- fdroid update
- fdroid deploy
- ls -laR repo
2023-08-14 10:35:05 +02:00
secrets: [ FDROID_KS_PASS, FDROID_KEY_PASS, FDROID_KS ]
2023-08-13 22:04:25 +02:00
push-pages-update-repo:
image: codeberg.org/freeyourgadget/android-fdroid-tools:latest
commands:
- if [ -f .do_not_build ]; then return 0; fi
- cd ../pages/pages/
- git add -A
- git status
- git diff
- ls -lsR fdroid/repo
- git commit -m "autodeploy"
- git remote remove origin
2023-08-14 10:49:48 +02:00
- git remote add origin https://Bazsalanszky:"$${GITEA_ACCESS_TOKEN}"@codeberg.org/Bazsalanszky/pages.git
2023-08-13 22:04:25 +02:00
# force push as we removed all data
2023-08-14 10:49:48 +02:00
- git push -f origin main
2023-08-13 22:04:25 +02:00
- cd ../../
- pwd
- ls -la
secrets: [ GITEA_ACCESS_TOKEN ]
2023-08-13 21:39:19 +02:00
when:
event: cron