commit
Move CI to the repo root and add a server check workflow
Co-Authored-By: Claude Opus 5.5 <[email protected]>
diff --git a/app/.github/workflows/build.yml b/.github/workflows/android.yml
similarity index 91%
rename from app/.github/workflows/build.yml
rename to .github/workflows/android.yml
index b59ea3b..8550ac7 100644
--- a/app/.github/workflows/build.yml
+++ b/.github/workflows/android.yml
@@ -1,10 +1,13 @@
name: Build APK
+# Only changes under app/ rebuild the APK; tags always do.
on:
push:
branches: [main]
tags: ["v*"]
+ paths: ["app/**", ".github/workflows/android.yml"]
pull_request:
+ paths: ["app/**", ".github/workflows/android.yml"]
workflow_dispatch:
permissions:
@@ -20,6 +23,9 @@ jobs:
runs-on: ubuntu-latest
env:
HAS_SIGNING_KEY: ${{ secrets.KEYSTORE_BASE64 != '' }}
+ defaults:
+ run:
+ working-directory: app
steps:
- uses: actions/checkout@v4
@@ -56,7 +62,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: inbox-apk
- path: inbox.apk
+ path: app/inbox.apk
- name: Publish release
if: startsWith(github.ref, 'refs/tags/v')
diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml
new file mode 100644
index 0000000..dd74e97
--- /dev/null
+++ b/.github/workflows/server.yml
@@ -0,0 +1,21 @@
+name: Server
+
+on:
+ push:
+ branches: [main]
+ paths: ["email/**", ".github/workflows/server.yml"]
+ pull_request:
+ paths: ["email/**", ".github/workflows/server.yml"]
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: email
+ steps:
+ - uses: actions/checkout@v4
+ - uses: oven-sh/setup-bun@v2
+ - run: bun install --frozen-lockfile
+ - run: bun run typecheck
+ - run: bun run test
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..af56f61
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.DS_Store
+.idea/
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..cce9aa2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+# Inbox
+
+A multi-domain mailbox on Cloudflare Workers, and its Android app.
+
+- [`email/`](email/): the Worker (Hono API on D1 + R2, mail through Resend) and
+ the Svelte web app it serves. See its README for setup and deploys.
+- [`app/`](app/): the Android app.
+
+CI lives in `.github/workflows/`: `server.yml` typechecks and tests `email/`,
+`android.yml` builds the APK. Each only runs when its own folder changes.
diff --git a/app/README.md b/app/README.md
index 8b15b57..fbc6f45 100644
--- a/app/README.md
+++ b/app/README.md
@@ -1,6 +1,6 @@
# Inbox for Android
-An Android app for [Inbox](https://github.com/doughmination/email). It's a
+An Android app for [Inbox](../email). It's a
[Trusted Web Activity](https://developer.chrome.com/docs/android/trusted-web-activity):
the live site at https://mail.doughmination.gay, shown full-screen in Chrome,
with its Web Push notifications delivered as the app's own.
@@ -33,7 +33,7 @@ changing too.
## CI
-`.github/workflows/build.yml` builds on every push and uploads `inbox.apk` as
+`.github/workflows/android.yml` (at the repo root) builds on every push and uploads `inbox.apk` as
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.