Skip to content

Debloat your Android TV, install apps, browse and transfer files on it, all from your phone. Just 3 MB, no tracking, no root, no PC.

release.yml: GitHub APK from the github flavor, Play AAB from play

tellyscope-agentdd70a5eefe37
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c6ac1ba..359ab2c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -123,7 +123,7 @@ jobs:
RELEASE_KEYSTORE: ${{ runner.temp }}/alpha.jks
RELEASE_KEY_ALIAS: ${{ secrets.ALPHA_KEY_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.ALPHA_KEY_PASSWORD }}
- run: ./gradlew :app:assembleRelease -Ptellyscope.alpha=${{ steps.tag.outputs.n }} --console=plain
+ run: ./gradlew :app:assembleGithubRelease -Ptellyscope.alpha=${{ steps.tag.outputs.n }} --console=plain
- name: Alpha pre-release
env:
@@ -135,7 +135,7 @@ jobs:
git push origin "$TAG"
fi
APK="Tellyscope-$TAG.apk"
- cp app/build/outputs/apk/release/app-release.apk "$APK"
+ cp app/build/outputs/apk/github/release/app-github-release.apk "$APK"
# The nearest tag before this commit, alpha or prod; a glob would find the tag just pushed.
PREV=$(git describe --tags --abbrev=0 --match 'v*' "$GITHUB_SHA^" 2>/dev/null || true)
{
@@ -157,6 +157,9 @@ jobs:
timeout-minutes: 30
permissions:
contents: write
+ outputs:
+ new: ${{ steps.version.outputs.new }}
+ version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v7
with:
@@ -200,7 +203,7 @@ jobs:
RELEASE_KEYSTORE: ${{ runner.temp }}/release.jks
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
- run: ./gradlew :app:assembleRelease --console=plain
+ run: ./gradlew :app:assembleGithubRelease --console=plain
# Notes: the version's CHANGELOG.md section, then every commit since the
# previous tag.
@@ -222,7 +225,56 @@ jobs:
git log --no-merges --pretty='- %s (%h)' ${PREV:+"$PREV.."}HEAD
} >> notes.md
APK="Tellyscope-$V.apk"
- cp app/build/outputs/apk/release/app-release.apk "$APK"
+ cp app/build/outputs/apk/github/release/app-github-release.apk "$APK"
git tag "v$V"
git push origin "v$V"
gh release create "v$V" "$APK" --title "Tellyscope $V" --notes-file notes.md --verify-tag
+
+ # Play: the same tag built as the play flavor, an app bundle signed with the
+ # release key, attached to the release prod just published. Its own job, so a
+ # failed bundle never holds back the APK.
+ play:
+ needs: prod
+ if: needs.prod.outputs.new == 'true'
+ runs-on: ubuntu-latest
+ environment: release
+ timeout-minutes: 30
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ ref: v${{ needs.prod.outputs.version }}
+
+ - uses: actions/setup-java@v6
+ with:
+ distribution: temurin
+ java-version: 25
+
+ - uses: gradle/actions/setup-gradle@v6
+
+ - name: Keystore
+ env:
+ RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
+ run: |
+ if [ -z "$RELEASE_KEYSTORE_BASE64" ]; then
+ echo "::error::Secret RELEASE_KEYSTORE_BASE64 is not set in the release environment; see CONTRIBUTING.md#releases"
+ exit 1
+ fi
+ printf '%s' "$RELEASE_KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/release.jks"
+
+ - name: Build
+ env:
+ RELEASE_KEYSTORE: ${{ runner.temp }}/release.jks
+ RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
+ RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
+ run: ./gradlew :app:bundlePlayRelease --console=plain
+
+ - name: Attach to the release
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ V: ${{ needs.prod.outputs.version }}
+ run: |
+ AAB="Tellyscope-$V-play.aab"
+ cp app/build/outputs/bundle/playRelease/app-play-release.aab "$AAB"
+ gh release upload "v$V" "$AAB"
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index fe34854..60ead95 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -14,7 +14,7 @@ Thanks for helping! Tellyscope is young, so the code and its structure are still
## Releases
- **Alpha:** to publish an alpha, put `[release]` anywhere in the title of the pull request into `dev` (any case), for example `Fix the remote [release]`. Merges without it only run CI. On a `[release]` merge, CI builds `app.tellyscope.alpha`, which installs next to the release, and once the build passes it tags the commit `vX.Y.Z-alpha.N` and publishes a GitHub pre-release under that tag, with the APK named `Tellyscope-vX.Y.Z-alpha.N.apk`. `X.Y.Z` is the current `versionName`, and `N` is one past the highest alpha of that version. A failed build tags nothing. You can still put out an alpha by hand: tag a commit that is on `dev` and push the tag, for example `git tag v0.1.0-alpha.1 origin/dev && git push origin v0.1.0-alpha.1`. The tag's `X.Y.Z` must equal `versionName` in `app/build.gradle.kts`, and its commit must be on `dev`; otherwise the build fails and publishes nothing.
-- **Shipping:** a release is a pull request from `dev` into `main`, merged with a merge commit. It must raise `versionName` and `versionCode` in `app/build.gradle.kts` past the latest `v*` tag and turn the `## Unreleased` section of [CHANGELOG.md](CHANGELOG.md) into that version's section; CI refuses anything else. Merging it tags `vX.Y.Z` and publishes a GitHub release with the signed APK, notes from the changelog section and the commits since the previous tag.
+- **Shipping:** a release is a pull request from `dev` into `main`, merged with a merge commit. It must raise `versionName` and `versionCode` in `app/build.gradle.kts` past the latest `v*` tag and turn the `## Unreleased` section of [CHANGELOG.md](CHANGELOG.md) into that version's section; CI refuses anything else. Merging it tags `vX.Y.Z` and publishes a GitHub release with the signed APK, notes from the changelog section and the commits since the previous tag. A second job then builds the same tag as the `play` flavor, an app bundle for Google Play, signed with the same release key, and attaches it to that release as `Tellyscope-X.Y.Z-play.aab`.
- **Signing:** alphas and releases are signed with two different keys, so an alpha can never install over the release app. Each key lives in its own GitHub Environment: `ALPHA_KEYSTORE_BASE64`, `ALPHA_KEY_ALIAS` and `ALPHA_KEY_PASSWORD` in `alpha`, which deploys only from `dev` and `v*-alpha.*` tags; `RELEASE_KEYSTORE_BASE64`, `RELEASE_KEY_ALIAS` and `RELEASE_KEY_PASSWORD` in `release`, which deploys only from `main`. `*_KEYSTORE_BASE64` is the keystore, base64-encoded, and `*_KEY_PASSWORD` is both the store and the key password (keytool's PKCS12 default uses one for both). A job with its secrets missing fails; it never falls back to the other key. Only the maintainer holds the keys; never commit a keystore. Local release builds are unsigned.
## Debloat lists