NOTES_FILE is already /tmp/Incido-<version>-changes.md, so 'cp $NOTES_FILE /tmp/$NOTES_ASSET' was a self-copy: cp exits 1 and set -e aborted the step AFTER both APKs had uploaded. That is what turned run 78 (tag v0.3.8.1) red - the LAN API change itself worked, the release and both APK assets landed first. Upload $NOTES_FILE directly instead.
/tmp is wiped on every reboot, forcing re-download of the JDK and
Android SDK (~700 MB) and, worse, re-minting the release signing
keystore. Persist the cache under /var/lib/gitea-runner/work so it
survives reboots. Genuine per-run scratch files stay in /tmp.
Per-version user-facing changelog moved out of the README table into
PREVIOUS_HISTORY.md (newest-first sections, Development Plan §11.1).
On tag push the workflow now harvests the matching section via
scripts/ci/release-notes.py and uses it as the release description,
uploading an Incido-<version>-changes.md beside the APKs; a missing
section falls back to the plain default description. CONTRIBUTING §5
documents the new release-notes maintenance step.
The build step minted a fresh keystore inside the checkout on every
run, so each CI release was signed with a different key. Upgrading
from any previous release then failed with a signature conflict
(INSTALL_FAILED_UPDATE_INCOMPATIBLE) — and with allowBackup=false,
the only workaround was uninstalling, which destroys the user's
notes.
The keystore is now minted once in /tmp/gitea-runner-work (the same
persistent cache that already holds the JDK and Android SDK) and
copied into the checkout before building. Every release from now on
shares one signing key, so in-place upgrades work. Only a runner-host
rebuild would mint a new key (breaking exactly one upgrade).
Note: v0.3.7.0 was signed with an ephemeral key that no longer
exists, so the v0.3.7.0 -> v0.3.7.1 upgrade still requires a one-time
uninstall (export a backup first).
The v0.3.7.1 release run failed in the attach step: the 28.7 MB debug
APK upload took ~126s through the Cloudflare proxy, which returned
"error code: 524" (origin timeout, ~100s limit). The step then crashed
parsing the non-JSON error page as JSON, and the release APK was never
attempted — leaving release 36 with zero assets.
upload_asset() now:
- retries with --retry-all-errors so HTTP error responses (524) are
retried, not just connection failures;
- verifies success server-side by listing the release assets after
each attempt (a 524 often means the origin saved the file before
Cloudflare gave up, so the response body is not trusted);
- only fails after 5 attempts with the asset still missing.
- signingConfigs.release now throws GradleException at config time
when keystore/release.jks is missing, printing the exact keytool
command from keystore/README.md instead of letting packageRelease
die later with the cryptic
"SigningConfig release is missing required property storeFile".
- .gitea/workflows/release.yml now mints the dev keystore on the
runner before assembleRelease (previously the signing config
was empty on a fresh runner, so the release APK was never
produced).
- versionCode 29 → 30, versionName "0.3.6.2" → "0.3.6.3";
APP_VERSION in SettingsViewModel bumped in lockstep; README
"Current release" + intro paragraph + Changelog row updated.
Refs: Incido Development Plan §11.