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
28 changes: 19 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: Release
#
# The very first AAB has to be uploaded manually through the Play Console — the
# Publishing API cannot create a new app, only push to one that already exists.
# Once the listing exists, add a service-account secret and uncomment the upload
# step below.
# After that, the last step uploads every main build to the internal track once the
# PLAY_SERVICE_ACCOUNT_JSON secret is set.

on:
push:
Expand All @@ -25,6 +25,9 @@ jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 40
env:
# A step's `if` cannot read secrets; expose only whether the Play key exists.
PLAY_UPLOAD_CONFIGURED: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON != '' }}
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -83,10 +86,17 @@ jobs:
gh release upload "$tag" "$dir"/* --clobber
echo "Published ${VERSION_NAME} (${VERSION_CODE}) on $tag" >> "$GITHUB_STEP_SUMMARY"

# - name: Upload to Play internal track
# uses: r0adkll/upload-google-play@v1
# with:
# serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
# packageName: com.scanrift.android
# releaseFiles: app/build/outputs/bundle/release/app-release.aab
# track: internal
# Sends every main build to Play's internal testing track. Skipped until the
# PLAY_SERVICE_ACCOUNT_JSON secret exists. Play accepts only *draft* releases until
# the app has passed its first review: set the repository variable
# PLAY_RELEASE_STATUS to `completed` after that, so builds reach testers directly.
- name: Upload to Play internal track
if: github.ref == 'refs/heads/main' && env.PLAY_UPLOAD_CONFIGURED == 'true'
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
packageName: com.scanrift.android
releaseFiles: app/build/outputs/bundle/release/app-release.aab
releaseName: ${{ env.VERSION_NAME }} (${{ env.VERSION_CODE }})
track: internal
status: ${{ vars.PLAY_RELEASE_STATUS || 'draft' }}
4 changes: 4 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ Compose version moves unexpectedly, check Coil first.
previous build's files. CI sets `VERSION_CODE` to 100 + the workflow's run number, so
each build is uploadable to Play without a manual bump; bump `versionName` by hand when
a release should get a new name (and a new GitHub release).
- **…and goes to Play's internal track** once the `PLAY_SERVICE_ACCOUNT_JSON` secret is
set (the step is skipped without it). Releases are created as `draft` until the
repository variable `PLAY_RELEASE_STATUS` is set to `completed`, which Play only allows
after the app's first review.

## Architecture

Expand Down
Loading