From c56b4f447abe6a21ea2891b6619d86c8e0e6ede4 Mon Sep 17 00:00:00 2001 From: Aaron Sulwer Date: Fri, 13 Nov 2026 15:07:24 -0700 Subject: [PATCH] Publish to Google Play on every merge The release workflow now also builds an App Bundle (-p:ForPlay=true makes the same build produce both the .apk and the .aab) and uploads it to the Play track named by the PLAY_TRACK repository variable, with the merged PR's title as "What's new". Until PLAY_TRACK is set the upload is skipped and the bundle is only kept as a workflow artifact. Adds a privacy policy page to the docs site, which Play requires for an app that reads contacts. Closes #24 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 55 ++++++++++++++++++++++++++++++--- CallGuard/CallGuard.csproj | 7 +++++ docs/how-it-works.md | 2 ++ docs/privacy.md | 57 +++++++++++++++++++++++++++++++++++ 4 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 docs/privacy.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3aee403..b5972f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ -# Builds a signed APK on every push to master and publishes it as a GitHub Release that anyone can -# download and install. +# Builds the app on every push to master, publishes the signed APK as a GitHub Release that anyone can +# download and install, and uploads the same build as an App Bundle (.aab) to Google Play. # # The project dictates the version: CallGuard.csproj makes it 1.0.yyMMdd (the build date) with a # versionCode of whole minutes since 2020-01-01 UTC. The release and its tag are named after the version @@ -15,6 +15,15 @@ # Required repository variable (public, not a secret): # SIGNING_CERT_SHA256 SHA-256 of the signing certificate. The release fails unless the APK is # signed with it, because phones refuse an update signed with another key. +# +# Google Play (skipped until PLAY_TRACK is set; the bundle is still kept as a workflow artifact): +# PLAY_SERVICE_ACCOUNT_JSON secret: JSON key of a service account with release permission for the +# app in Play Console (the same account GroceryList uses works) +# PLAY_TRACK variable: internal, alpha (= Closed testing), beta (= Open testing) or +# production +# PLAY_RELEASE_STATUS variable, optional: completed (default) rolls the release out as soon as +# Google approves it; draft only uploads it, to roll out from Play Console +# The release notes on Play ("What's new") are the merged pull request's title. name: Release APK @@ -120,7 +129,8 @@ jobs: # CallGuard.csproj signs with this keystore when CALLGUARD_KEYSTORE_PASS is set; the password is # passed to the signing tool by reference, so it never appears on a command line or in the log. - - name: Build signed APK + # ForPlay builds the .aab for Google Play next to the .apk, from the same build and version. + - name: Build signed APK and App Bundle env: CALLGUARD_KEYSTORE_PASS: ${{ secrets.CALLGUARD_KEYSTORE_PASS }} run: > @@ -128,6 +138,7 @@ jobs: "-p:AndroidSdkDirectory=$env:ANDROID_SDK_ROOT" "-p:JavaSdkDirectory=$env:JAVA_HOME" "-p:CallGuardKeyStore=$env:KEYSTORE_PATH" + -p:ForPlay=true # A release signed with any other key couldn't update the app on anyone's phone. The version is read # from the APK itself, so the release always carries exactly the version the app reports. @@ -164,14 +175,22 @@ jobs: New-Item -ItemType Directory -Force dist | Out-Null Copy-Item $apk.FullName "dist/CallGuard-$version.apk" + + # The bundle comes from the same build, so it has the same version and signature. + $aab = Join-Path $apk.DirectoryName "$env:PACKAGE_NAME-Signed.aab" + if (-not (Test-Path $aab)) { throw "Signed App Bundle not found next to the APK" } + New-Item -ItemType Directory -Force dist-play | Out-Null + Copy-Item $aab "dist-play/CallGuard-$version.aab" "version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 "versionCode=$versionCode" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 - - name: Keep APK as a workflow artifact + - name: Keep APK and App Bundle as a workflow artifact uses: actions/upload-artifact@v7 with: name: callguard-apk - path: dist/*.apk + path: | + dist/*.apk + dist-play/*.aab retention-days: 30 # One release per version. A later build of the same version (same day) replaces the earlier @@ -204,6 +223,32 @@ jobs: --title "Call Guard $env:VERSION" --notes $notes --generate-notes if ($LASTEXITCODE -ne 0) { throw "Couldn't create the $tag release" } + # "What's new" on Play: the merged pull request's title (the second paragraph of GitHub's merge + # commit message), or the commit's own subject for a direct push or a squash merge. + - name: Write Play release notes + if: vars.PLAY_TRACK != '' + run: | + $subject = git log -1 --format=%s + $notes = if ($subject -like 'Merge pull request*') { + (git log -1 --format=%b) | Where-Object { $_.Trim() } | Select-Object -First 1 + } + if (-not $notes) { $notes = $subject } + if ($notes.Length -gt 500) { $notes = $notes.Substring(0, 497) + '...' } + New-Item -ItemType Directory -Force whatsnew | Out-Null + Set-Content -Path whatsnew/whatsnew-en-US -Value $notes -NoNewline -Encoding utf8NoBOM + Write-Host "What's new: $notes" + + - name: Upload to Google Play + if: vars.PLAY_TRACK != '' + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }} + packageName: ${{ env.PACKAGE_NAME }} + releaseFiles: dist-play/*.aab + tracks: ${{ vars.PLAY_TRACK }} + status: ${{ vars.PLAY_RELEASE_STATUS || 'completed' }} + whatsNewDirectory: whatsnew + - name: Remove keystore if: always() run: if ($env:KEYSTORE_PATH -and (Test-Path $env:KEYSTORE_PATH)) { Remove-Item $env:KEYSTORE_PATH -Force } diff --git a/CallGuard/CallGuard.csproj b/CallGuard/CallGuard.csproj index 59deed6..f2225ac 100644 --- a/CallGuard/CallGuard.csproj +++ b/CallGuard/CallGuard.csproj @@ -35,6 +35,13 @@ false + + + aab + aab;apk + + diff --git a/docs/how-it-works.md b/docs/how-it-works.md index edca805..1d60808 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -86,3 +86,5 @@ aren't blocked. Use the spam and blocking settings in Google Messages, or in Goo - **Phone backups:** if Android's backup to your Google account is turned on, Call Guard's patterns and call log may be included in it, like other apps' data, so they can come back on a new phone. - **Open source:** the complete source code is on [GitHub](https://github.com/asulwer/CallGuard). + +The full [privacy policy](privacy.html) has the details. diff --git a/docs/privacy.md b/docs/privacy.md new file mode 100644 index 0000000..932e0d6 --- /dev/null +++ b/docs/privacy.md @@ -0,0 +1,57 @@ +--- +layout: default +title: Privacy policy +nav_order: 8 +--- + +# Privacy policy +{: .no_toc } + +Call Guard blocks unwanted calls on your phone. Everything it does happens on your phone: it has no +servers, no accounts, no ads and no analytics, and it doesn't send any data anywhere. +{: .fs-6 .fw-300 } + +## What Call Guard reads + +- **Incoming phone numbers.** As your phone's Caller ID & spam app, Call Guard is shown the number of each + incoming call so it can decide whether to block it. +- **Your contacts.** When a call matches one of your blocked patterns, Call Guard checks whether the + number is in your contacts, so people you know always get through. It also reads which account the + matching contact comes from (for example Google or WhatsApp) to show that in its call list. + +## What Call Guard stores + +- **Your patterns** and their notes. +- **A list of the last 500 calls it screened:** the number, the time, what it did and why (for example + "contact in Google (matches 602\*)"). + +Both are kept in the app's private storage on your phone, which other apps can't read. Call Guard doesn't +save your contacts: it looks a number up when a call comes in and keeps only the result shown in the call +list. + +## What Call Guard shares + +Nothing. Call Guard doesn't request internet access, so it can't send your contacts, patterns or call +history to anyone, including the developer. The place names it shows (such as "Arizona") come from data +built into the app. + +If Android's backup to your Google account is turned on, your patterns and call list may be included in +that backup, as with other apps' data. That backup is handled by Android and Google under your Google +account's settings, not by Call Guard. + +## Deleting your data + +**Clear log** on the Calls tab deletes the call list, and **Remove** deletes a pattern. Uninstalling Call +Guard deletes everything it stored. + +## Children + +Call Guard isn't directed at children and doesn't knowingly collect information from anyone. + +## Changes and contact + +Changes to this policy are published on this page. The app's complete source code is on +[GitHub](https://github.com/asulwer/CallGuard). For questions, open an issue +[there](https://github.com/asulwer/CallGuard/issues). + +*Last updated: November 13, 2026.*