Compare commits

...

7 Commits

Author SHA1 Message Date
Balazs Toldi
81c190a9c0
Fix steps in nightly build 2023-08-13 22:08:19 +02:00
Balazs Toldi
e2f36c334b
Fix steps in nightly build 2023-08-13 22:04:25 +02:00
Balazs Toldi
891215fcb3
Fix path for pull-repo-config step in nightly 2023-08-13 21:58:56 +02:00
Balazs Toldi
04e022cbbc
Do not run the build pipeline on cron jobs 2023-08-13 21:54:51 +02:00
Balazs Toldi
1f4f3a475d
Fix nightly build apk name 2023-08-13 21:52:52 +02:00
Balazs Toldi
3e6d435116
Fix nightly build indentation in CI definition 2023-08-13 21:42:20 +02:00
Balazs Toldi
9c6f946602
Test nightly build CI 2023-08-13 21:39:19 +02:00
3 changed files with 71 additions and 3 deletions

View File

@ -24,4 +24,6 @@ steps:
prerelease: true
note: "This is an alpha release. Expect many bugs and unfinished features!"
when:
event: [ tag ]
event: [ tag ]
when:
event: [ push, tag, pull_request ]

66
.woodpecker/nightly.yaml Normal file
View File

@ -0,0 +1,66 @@
steps:
build:
image: alvrme/alpine-android:android-33-jdk11
commands:
- ./gradlew :app:assembleNightly
sign:
image: alvrme/alpine-android:android-33-jdk11
commands:
- ./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
- cp /woodpecker/src/codeberg.org/Bazsalanszky/Infinity-For-Lemmy/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
update-fdroid-data:
image: codeberg.org/freeyourgadget/android-fdroid-tools:latest
commands:
- pwd
- cd ../repoconfig/fdroid-repo-config/
- fdroid update
- fdroid deploy
- ls -laR repo
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
- git remote add origin https://"$${GITEA_ACCESS_TOKEN}"@codeberg.org/Freeyourgadget/pages.git
# force push as we removed all data
- git push -f origin master
- cd ../../
- pwd
- ls -la
secrets: [ GITEA_ACCESS_TOKEN ]
when:
event: cron

View File

@ -59,12 +59,12 @@ android {
variant.resValue "string", "applicationId", variant.applicationId
if (variant.buildType.name == 'nightly' || variant.buildType.name == 'nopebble') {
if (variant.buildType.name == 'nightly') {
variant.outputs.all {
setVersionCodeOverride(getCommitVersionCode())
setVersionNameOverride(variant.versionName)
outputFileName = "${applicationId}_${variant.versionName}.apk"
outputFileName = "${applicationId}.apk"
}
}
}