A free and cloudless replacement for your gadget vendors' closed source Android applications. See the list for supported devices. https://gadgetbridge.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

101 lines
3.6 KiB

pipeline:
build-apks:
image: androidsdk/android-30
commands:
# build the apks
- echo "$${SIGNING_KEY}" | base64 -d > app/keystore.p12
- ./gradlew assembleNightly -Dnightly_store_file="keystore.p12" -Dnightly_store_password="$${KEYSTOREPASS}" -Dnightly_key_alias="gadgetbridge" -Dnightly_key_password="$${KEYPASS}"
- ./gradlew assembleNopebble -Dnightly_store_file="keystore.p12" -Dnightly_store_password="$${KEYSTOREPASS}" -Dnightly_key_alias="gadgetbridge" -Dnightly_key_password="$${KEYPASS}"
secrets: [ signing_key, keystorepass, keypass ]
pull-repo-config:
image: python:3.9
commands:
- cd ..
- pwd
- mkdir repoconfig
- cd repoconfig
- pwd
- git clone --depth 1 https://codeberg.org/Freeyourgadget/fdroid-repo-config.git
- apt update
- apt -y install jq
# make a release on codeberg, with list of latest commits
# we do not do this, since we release via f-droid repo now
# also, the release tag would point to a wrong repo
#- ./fdroid-repo-config/repoconfig/remove_old_nightly.sh
#- ./fdroid-repo-config/repoconfig/publish_nightly.sh
- ./fdroid-repo-config/repoconfig/copy_files_to_repo_config.sh
secrets: [ commit_token ]
pull-pages:
image: python:3.9
commands:
# prepare the pages repo, so fdroidclient can push files into it later
- cd ..
- pwd
- mkdir pages
- cd pages
- pwd
- git clone --depth 2 https://codeberg.org/Freeyourgadget/pages.git
- 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
#- rm -f fdroid/repo/*apk
update-fdroid-data:
image: cs8898/android-fdroid-sdk:latest
commands:
# froidserver update
- pwd
- apt update
- apt -y install apksigner
- python3 -m pip install fdroidserver==2.1a0 yattag
- ../repoconfig/fdroid-repo-config/repoconfig/prepare_changelog.sh
- cd ../repoconfig/fdroid-repo-config/repoconfig
# get secrets from storage
- echo "$${SIGNING_KEY}" | base64 -d > keystore.p12
- sed -i "s#KEYSTOREPASS_PLACEHOLDER#$${KEYSTOREPASS}#g" config.yml
- sed -i "s#KEYPASS_PLACEHOLDER#$${KEYPASS}#g" config.yml
- fdroid update
- python3 repo_listing.py > listing.html
- sed -i "s#</body>#LISTING\n</body>#" ./repo/index.html
- sed -i -e "/LISTING/r listing.html" -e '//d' ./repo/index.html
- fdroid deploy
- ls -laR repo
secrets: [ signing_key, keystorepass, keypass ]
push-pages-update-repo:
image: python:3.9
commands:
- cd ../pages/pages/
- git add -A
- git status
- git diff
- ls -lsR fdroid/repo
- git commit -m "autodeploy, $${DRONE_COMMIT_MESSAGE}"
- git remote remove origin
- git remote add origin https://"$${COMMIT_TOKEN}"@codeberg.org/Freeyourgadget/pages.git
# force push as we removed all data
- git push -f origin master
# bump
secrets: [ commit_token ]
on-error:
image: python:3.9
commands:
- cd ..
- mkdir -p repoconfig
- cd repoconfig
- git clone --depth 1 https://codeberg.org/Freeyourgadget/fdroid-repo-config.git || true
- ./fdroid-repo-config/repoconfig/create_issue_comment.sh "CI failed"
when:
status: failure
secrets: [ commit_token ]
#bump
#this doesn't work yet:
#https://github.com/woodpecker-ci/woodpecker/issues/687
when:
branch: nightly-branch