CI: build and publish every package from Woodpecker

Pushes to main run the tests. The Deploy button publishes the Windows, RPM,
deb and F-Droid packages to the same NAS directories a dev machine uses, with
the same keys, then runs update-repo.sh, so public URLs don't change.

Builds run on Debian 12, in an image defined in ci/builder, so the Linux
packages now need glibc 2.36 instead of Fedora 44's 2.43.
This commit is contained in:
2026-11-01 11:54:49 -06:00
parent c7572ae7b0
commit a9ed6456da
10 changed files with 440 additions and 13 deletions

View File

@@ -12,6 +12,7 @@
# Options:
# --init-keystore generate the app signing key (once, ever) and keystore.properties
# --allow-dirty publish uncommitted changes; the version gets a -dirty suffix
# --skip-published finish without error if the repo already has this version
#
# Environment:
# MTGC_FDROID_DIR repo directory, if not given as an argument
@@ -26,7 +27,7 @@
set -euo pipefail
usage() {
sed -n '3,24p' "$0" | sed 's/^# \{0,1\}//'
sed -n '3,25p' "$0" | sed 's/^# \{0,1\}//'
exit "${1:-0}"
}
@@ -40,11 +41,13 @@ APP_KEY_ALIAS="mtgc"
init_keystore=false
allow_dirty=false
skip_published=false
dir="${MTGC_FDROID_DIR:-}"
while [ $# -gt 0 ]; do
case "$1" in
--init-keystore) init_keystore=true ;;
--allow-dirty) allow_dirty=true ;;
--skip-published) skip_published=true ;;
-h | --help) usage ;;
-*) usage 1 ;;
*) dir="$1" ;;
@@ -187,6 +190,10 @@ for apk in "$dir"/repo/"${APP_ID}"_*.apk "$dir"/archive/"${APP_ID}"_*.apk; do
[ "$code" -gt "$newest" ] && newest="$code"
done
if [ "$version_code" -le "$newest" ]; then
if $skip_published; then
info "versionCode $version_code is already published; nothing to do"
exit 0
fi
err "versionCode $version_code is not newer than $newest, already in the repo; commit something first"
exit 1
fi