Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 50 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -120,14 +129,16 @@ 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: >
dotnet publish $env:PROJECT -f net10.0-android -c Release
"-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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }
7 changes: 7 additions & 0 deletions CallGuard/CallGuard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>

<!-- -p:ForPlay=true also builds an App Bundle (.aab), the only format Google Play accepts, next to the
.apk: one build feeds both the GitHub release and Play, with the same version. -->
<PropertyGroup Condition="'$(ForPlay)' == 'true'">
<AndroidPackageFormat>aab</AndroidPackageFormat>
<AndroidPackageFormats>aab;apk</AndroidPackageFormats>
</PropertyGroup>

<!-- Pixel phones are 64-bit ARM; leaving out the other CPU types makes the release APK much smaller.
To try a release build in the (x64) emulator, build with -p:ForEmulator=true -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
Expand Down
2 changes: 2 additions & 0 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
57 changes: 57 additions & 0 deletions docs/privacy.md
Original file line number Diff line number Diff line change
@@ -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.*