commit
Release every app on every push to main
Each build from main now publishes a signed release named by its version (plural-v0.1.N, inbox-v1.0.N, ...), so there's always an APK to grab without tagging. Inbox keeps its rolling inbox-latest release alongside. Tags and manual runs still pick a version name.
diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml
index 044c045..fefd473 100644
--- a/.github/workflows/android-app.yml
+++ b/.github/workflows/android-app.yml
@@ -104,6 +104,7 @@ jobs:
MANUAL: ${{ inputs.release_version }}
BASE: ${{ inputs.version_code_base }}
DEV_PREFIX: ${{ inputs.dev_version_prefix }}
+ EVENT: ${{ github.event_name }}
run: |
code=$((BASE + GITHUB_RUN_NUMBER))
if [ "$IS_TAG" = true ]; then
@@ -112,6 +113,10 @@ jobs:
elif [ -n "$MANUAL" ]; then
name=${MANUAL#v}
tag="$PREFIX$name"
+ elif [ "$EVENT" != pull_request ] && [ "$GITHUB_REF" = refs/heads/main ]; then
+ # Every build from main is released, named by its version code.
+ name="$DEV_PREFIX.$code"
+ tag="$PREFIX$name"
else
name="$DEV_PREFIX.$code"
tag=""
@@ -222,7 +227,7 @@ jobs:
# A rolling release that always holds the newest build from main.
- name: Publish rolling release
- if: env.IS_ROLLING == 'true' && env.RELEASE_TAG == ''
+ if: env.IS_ROLLING == 'true'
env:
GH_TOKEN: ${{ github.token }}
ROLLING: ${{ inputs.rolling_tag }}
diff --git a/api-helper/README.md b/api-helper/README.md
index d0e22bb..3f92841 100644
--- a/api-helper/README.md
+++ b/api-helper/README.md
@@ -87,9 +87,9 @@ There's no Android Studio needed — GitHub builds it for you. Device Reporter l
[doughmination/apps](https://github.com/doughmination/apps) monorepo, and its workflow is
`.github/workflows/device-reporter.yml`.
-**Quick test build:** every push to `main` that touches `api-helper/` runs the workflow and
-uploads an APK. Open the run under the **Actions** tab and download the
-**device-reporter-…** artifact. Good for trying things out.
+**Every change:** every push to `main` that touches `api-helper/` builds a signed APK and
+publishes it as a release (`device-reporter-v2.0.N`). Download it from the repo's
+**Releases** page.
**Proper signed release:** go to the **Actions** tab → **Device Reporter** → **Run workflow**,
type a version like `v2.1.0` in the box, and run it. GitHub builds a signed APK, creates the
diff --git a/docs/releasing.md b/docs/releasing.md
index 26bcc8c..f08aafc 100644
--- a/docs/releasing.md
+++ b/docs/releasing.md
@@ -1,22 +1,30 @@
# Releasing
-Each app releases on its own: a tag for one app builds and publishes only that
-app. All of it runs in `.github/workflows/android-app.yml`, called by each
-app's workflow.
+Each app releases on its own, and only when it changed. All of it runs in
+`.github/workflows/android-app.yml`, called by each app's workflow.
## When CI runs
An app's workflow runs when a push to `main` (or a pull request) touches its
directory, the shared Gradle files (`gradle/`, `*.gradle.kts`,
`gradle.properties`, `gradlew*`), or its workflow, and whenever its release tag
-is pushed. Every run builds the release APK and uploads it as a run artifact.
+is pushed.
-| App | Release tag | Also |
+- **Every push to `main` that builds an app publishes a release of it**, signed,
+ named by its version: `plural-v0.1.107` holds `plural-0.1.107.apk`. A change
+ to the shared Gradle files or `android-app.yml` releases every app.
+- Pull requests only build (unsigned or debug-signed) and publish nothing.
+- A tag, or "Run workflow" with a version, publishes a release with a chosen
+ version name instead, for when a build deserves a real number.
+
+| App | Releases from `main` | Chosen version |
|---|---|---|
-| Device Reporter | `device-reporter-v2.1.0` | "Run workflow" with a version creates the tag |
-| Inbox | `inbox-v1.2.0` | every build from `main` replaces the `inbox-latest` release |
-| Doughmination Manager | `manager-v0.1.0` | "Run workflow" with a version creates the tag |
-| Plural | `plural-v0.1.0` | "Run workflow" with a version creates the tag |
+| Device Reporter | `device-reporter-v2.0.N` | `device-reporter-v2.1.0` |
+| Inbox | `inbox-v1.0.N`, and `inbox-latest` always holds the newest | `inbox-v1.2.0` |
+| Doughmination Manager | `manager-v0.1.N` | `manager-v0.1.0` |
+| Plural | `plural-v0.1.N` | `plural-v0.1.0` |
+
+(`N` is the version code.) The mail site's `/download` follows `inbox-latest`.
```sh
git tag inbox-v1.2.0 && git push origin inbox-v1.2.0
diff --git a/email/README.md b/email/README.md
index 02d88d8..d6ffb1b 100644
--- a/email/README.md
+++ b/email/README.md
@@ -68,9 +68,9 @@ changing too.
`.github/workflows/inbox.yml` builds whenever `email/` (or the shared Gradle
setup) changes and uploads the APK, named by version (`inbox-1.0.112.apk`), as
-an artifact. Each build from `main` replaces the rolling `inbox-latest`
-release, which the mail site's `/download` link redirects to, and pushing an
-`inbox-v1.2.0` tag attaches `inbox-1.2.0.apk` to a release of its own. Secrets
+a release of its own (`inbox-v1.0.112`). Each build from `main` also replaces the
+rolling `inbox-latest` release, which the mail site's `/download` link
+redirects to, and pushing an `inbox-v1.2.0` tag attaches `inbox-1.2.0.apk` to a release of its own. Secrets
(`INBOX_KEYSTORE_BASE64`, `INBOX_KEYSTORE_PASSWORD`, optionally
`INBOX_GOOGLE_SERVICES_JSON`) and version codes are in
[docs/releasing.md](../docs/releasing.md).
diff --git a/plural/README.md b/plural/README.md
index ad6ac96..bed035d 100644
--- a/plural/README.md
+++ b/plural/README.md
@@ -81,6 +81,7 @@ From the repository root:
`-PapiUrl=https://…/v2` points a build at another API.
-CI: `plural.yml` builds and signs it (tags `plural-v*` release it), and
+CI: `plural.yml` builds, signs and releases it on every push to `main` that
+touches `plural/` (`plural-v0.1.N`), and
`plural-smoke.yml` installs the signed APK on an emulator, walks the tabs and
uploads screenshots.