ci: adopt the modern calendula pipeline + Codeberg mirror
Port Calendula's current CI/release pipeline: - ci.yaml: pull_request-triggered, change-scope classification (docs/metadata-only PRs skip the Android build but still report a green CI), and a reproducible-release invariant guard. - release.yaml: the committed versionName is the source of truth — a bump reaching main triggers the release, which builds, signs, publishes to the F-Droid repo, then mints the vX.Y.Z tag + Gitea release and mirrors it to Codeberg with the signed APK + SHA-256 checksum. workflow_dispatch runs the re-sign-only recovery path. - Gitea releases are flagged as pre-releases while MAJOR is 0. - build.gradle.kts: reproducible-release invariants (vcsInfo, dependenciesInfo) + a releaseTest variant for the on-device gate. - fastlane/ becomes the single source of truth for store metadata; the localized F-Droid layout is generated from it at release time. - Port scripts/, .gitea/ISSUE_TEMPLATE/, and rewrite docs/RELEASING.md for the versionName-in-main model; fix stale references elsewhere. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
49
scripts/verify-release.sh
Executable file
49
scripts/verify-release.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build the release-candidate APK and install it on a connected device for the
|
||||
# mandatory pre-release on-device check (see docs/RELEASING.md).
|
||||
#
|
||||
# It builds the `releaseTest` variant: the same R8 shrinking + obfuscation and
|
||||
# resource shrinking as the published `release` build, but debug-signed and
|
||||
# with a `.releasetest` applicationId suffix so it installs alongside the
|
||||
# production and debug apps. This is what surfaces release-only breakage (R8
|
||||
# stripping) and first-run states (permission not yet granted) that the
|
||||
# unminified debug build — or a device that already holds the permission —
|
||||
# silently hides.
|
||||
#
|
||||
# Usage: scripts/verify-release.sh
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
PKG="de.jeanlucmakiola.agendula.releasetest"
|
||||
APK="app/build/outputs/apk/releaseTest/app-releaseTest.apk"
|
||||
|
||||
echo "==> Building release-candidate APK (releaseTest, R8 minified)…"
|
||||
./gradlew :app:assembleReleaseTest
|
||||
|
||||
echo "==> Installing $PKG …"
|
||||
adb install -r "$APK"
|
||||
|
||||
echo "==> Resetting to a first-run state (revoking tasks + notification permissions)…"
|
||||
# Force the permission-not-granted state so the permission gate / onboarding is
|
||||
# exercised every time — R8-only breakage and first-run crashes never show up in
|
||||
# the unminified debug build, nor on a device that already holds the permission.
|
||||
# Both tasks-provider permission sets are declared; revoke each so whichever the
|
||||
# device's provider uses starts ungranted.
|
||||
adb shell pm revoke "$PKG" org.dmfs.permission.READ_TASKS 2>/dev/null || true
|
||||
adb shell pm revoke "$PKG" org.dmfs.permission.WRITE_TASKS 2>/dev/null || true
|
||||
adb shell pm revoke "$PKG" org.tasks.permission.READ_TASKS 2>/dev/null || true
|
||||
adb shell pm revoke "$PKG" org.tasks.permission.WRITE_TASKS 2>/dev/null || true
|
||||
adb shell pm revoke "$PKG" android.permission.POST_NOTIFICATIONS 2>/dev/null || true
|
||||
|
||||
echo
|
||||
echo "Installed and reset. Now verify ON THE DEVICE before releasing:"
|
||||
echo " 1. Launch from a clean state — the permission screen must appear (no crash)."
|
||||
echo " 2. Grant tasks access — the task list must load."
|
||||
echo " 3. Create a task with a due reminder and confirm the notification fires."
|
||||
echo " 4. Exercise the release's headline changes end to end."
|
||||
echo
|
||||
echo "Watch for crashes with: adb logcat -b crash"
|
||||
echo "Only merge the release branch to main once all of the above pass on a device"
|
||||
echo "(the merge is what publishes the release — see docs/RELEASING.md)."
|
||||
Reference in New Issue
Block a user