3 changed files with 11 additions and 7 deletions

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ lock), then read the published index back.
```yaml ```yaml
- uses: https://git.silverlabs.uk/SilverLABS/ci-actions/fdroid-publish@v1 - uses: https://git.silverlabs.uk/SilverLABS/ci-actions/fdroid-publish@v1
with: with:
app: silverchat # silverchat | silvervpn | silverstore app: silverchat # silverchat | silvervpn | silverstore | silvermail | silverbeats
apk: path/to/app-release.apk apk: path/to/app-release.apk
channel: beta # default channel: beta # default
version-code: ${{ github.run_number }} # optional; read from the APK if omitted version-code: ${{ github.run_number }} # optional; read from the APK if omitted
+1 -1
View File
@@ -7,7 +7,7 @@ description: >
reads the index back afterwards. reads the index back afterwards.
inputs: inputs:
app: app:
description: silverchat | silvervpn | silverstore description: silverchat | silvervpn | silverstore | silvermail | silverbeats
required: true required: true
apk: apk:
description: Path to the signed APK description: Path to the signed APK
+9 -5
View File
@@ -6,7 +6,7 @@
# run from the app's own CI instead of a laptop: # run from the app's own CI instead of a laptop:
# scp the APK to <repoRoot>/incoming on the repo host, run the host's # scp the APK to <repoRoot>/incoming on the repo host, run the host's
# /srv/fdroid/bin/ingest.sh (which verifies the signer cert against the pin, # /srv/fdroid/bin/ingest.sh (which verifies the signer cert against the pin,
# moves it to repo/<package>.apk and rebuilds the index under a lock), then read # moves it to repo/<package>_<versionCode>.apk and rebuilds the index under a lock), then read
# the published index back — ingest returning 0 is not proof a client sees it. # the published index back — ingest returning 0 is not proof a client sees it.
# #
# Inputs arrive as INPUT_* environment variables (see action.yml). # Inputs arrive as INPUT_* environment variables (see action.yml).
@@ -30,7 +30,9 @@ case "$app" in
silverchat) pkg=uk.silverlabs.silverchat; cert=06c4ac92e17594d94d75eb9ed85c619aa3aa73cee3d9e64c12ab11255d28a280 ;; silverchat) pkg=uk.silverlabs.silverchat; cert=06c4ac92e17594d94d75eb9ed85c619aa3aa73cee3d9e64c12ab11255d28a280 ;;
silvervpn) pkg=uk.silverlabs.silvervpn; cert=706a56b202b37d5fb2f5d4e89dea819fa53a372eecc31999a125782e6a3c8cab ;; silvervpn) pkg=uk.silverlabs.silvervpn; cert=706a56b202b37d5fb2f5d4e89dea819fa53a372eecc31999a125782e6a3c8cab ;;
silverstore) pkg=uk.silverlabs.silverstore; cert=f3d835bbd3717f151400b4e0e95212289d585f568690fb05634881f26ec251e4 ;; silverstore) pkg=uk.silverlabs.silverstore; cert=f3d835bbd3717f151400b4e0e95212289d585f568690fb05634881f26ec251e4 ;;
*) fail "app must be silverchat, silvervpn or silverstore (got '$app')" ;; silvermail) pkg=uk.silverlabs.silvermail; cert=ccb60c6adc9b015cef88ad9a18a6194178c52754097a3f1d61029b1f6ef32ba2 ;;
silverbeats) pkg=uk.silverlabs.silverbeats; cert=bed6d769851c415a868863b845807ab41da0d7da0ad82f87797830f487210d60 ;;
*) fail "app must be silverchat, silvervpn, silverstore, silvermail or silverbeats (got '$app')" ;;
esac esac
case "$channel" in case "$channel" in
beta) root=/srv/fdroid-test; url=https://apps.silverlined.uk/fdroid-test/repo ;; beta) root=/srv/fdroid-test; url=https://apps.silverlined.uk/fdroid-test/repo ;;
@@ -99,9 +101,11 @@ head_code() { # highest versionCode the channel serves for $pkg (0 if none)
before=$(head_code) || fail "could not read the $channel index at $url" before=$(head_code) || fail "could not read the $channel index at $url"
say "$channel serves $pkg versionCode $before; this APK is ${version_code:-unknown}" say "$channel serves $pkg versionCode $before; this APK is ${version_code:-unknown}"
# ingest.sh REPLACES repo/<package>.apk, so the channel only ever holds one APK # ingest.sh publishes repo/<package>_<versionCode>.apk and keeps only the newest
# per app. Publishing an older build over a newer one would roll the channel # two builds per app (silverlined-deploy #51), so publishing an older build would
# back — F-Droid never downgrades installed apps, so it would just go stale. # at best be pruned straight away and at worst evict the previous build that
# clients still holding the old index are downloading. F-Droid never downgrades
# installed apps anyway.
if [ -n "$version_code" ] && [ "$version_code" -le "$before" ]; then if [ -n "$version_code" ] && [ "$version_code" -le "$before" ]; then
say "::notice::$pkg $version_code is not newer than what $channel already serves ($before) — nothing to publish" say "::notice::$pkg $version_code is not newer than what $channel already serves ($before) — nothing to publish"
exit 0 exit 0