Dough Git

commit

Publish a rolling latest release from main

commit
647a298f03b9f91ce959e20a98f6684b1345d2f8
author
Clove Twilight <[email protected]>
date
2026-10-24 23:16
Co-Authored-By: Claude Opus 5.5 <[email protected]>

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5db7a13..b59ea3b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,6 +10,11 @@ on:
 permissions:
   contents: write
 
+# Builds from main replace the same release, so let them finish in order.
+concurrency:
+  group: build-${{ github.ref }}
+  cancel-in-progress: false
+
 jobs:
   build:
     runs-on: ubuntu-latest
@@ -58,3 +63,18 @@ jobs:
         env:
           GH_TOKEN: ${{ github.token }}
         run: gh release create "$GITHUB_REF_NAME" inbox.apk --generate-notes
+
+      # A rolling "latest" release that always holds the newest build from main,
+      # so releases/download/latest/inbox.apk is a link that never changes.
+      - name: Publish rolling latest
+        if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && env.HAS_SIGNING_KEY == 'true'
+        env:
+          GH_TOKEN: ${{ github.token }}
+          VERSION_NAME: 1.0.${{ github.run_number }}
+        run: |
+          gh release delete latest --cleanup-tag --yes || true
+          gh release create latest inbox.apk \
+            --target "$GITHUB_SHA" \
+            --title "Latest build ($VERSION_NAME)" \
+            --notes "Built from ${GITHUB_SHA::7} on main. Installs over any earlier build." \
+            --latest
diff --git a/.gitignore b/.gitignore
index e205d6b..71fdeac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ build/
 local.properties
 *.jks
 keystore.properties
+inbox.apk
diff --git a/README.md b/README.md
index d1f5689..8b15b57 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,10 @@ changing too.
 ## CI
 
 `.github/workflows/build.yml` builds on every push and uploads `inbox.apk` as
-an artifact. Pushing a `v*` tag also attaches it to a GitHub release. It signs
+an artifact. Each build from `main` replaces the rolling `latest` release, so
+the newest APK is always at
+https://github.com/doughmination/email-app/releases/download/latest/inbox.apk.
+Pushing a `v*` tag also attaches it to a GitHub release of its own. It signs
 with two repository secrets:
 
 - `KEYSTORE_BASE64`: `base64 -w0 inbox.jks`