From a418eef0b35001b2354161efba30ac58c1fe396d Mon Sep 17 00:00:00 2001 From: Mas Azalya Date: Mon, 2 Nov 2026 16:08:32 +0800 Subject: [PATCH 1/5] DEV-1395: RELEASING.md names the signer line apksigner actually prints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the runner apksigner prints 'V2 Signer: certificate SHA-256 digest', not 'Signer #1 …', as the first dry run on master showed. Also says how Play Console formats the same digest. Co-Authored-By: Claude Opus 5.5 --- .../shimmerServiceExample/RELEASING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md b/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md index 2b3200f..03df855 100644 --- a/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md +++ b/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md @@ -57,9 +57,9 @@ To check the signing and the version before publishing anything: A dry run does everything up to the signed APK and stops. Open the run to check: - **build** → *Collect and check the APK* prints the APK's `versionCode` and `versionName`, and - `Signer #1 certificate SHA-256 digest`. That digest must match Play Console → ShimmerCapture → - *Test and release* → *App integrity* → **Upload key certificate**. If it doesn't, Play rejects the - upload. + `V2 Signer: certificate SHA-256 digest`. That digest must match Play Console → ShimmerCapture → + *Test and release* → *App integrity* → **Upload key certificate**, which shows it in capitals with + colons (`5F:35:3C:…`). If it doesn't match, Play rejects the upload. - The APK itself is on the run page under **Artifacts** (`shimmercapture-apk`), to install on a test device. From de63fb3339cffd4f9aac7d04a95bdd92b5b74572 Mon Sep 17 00:00:00 2001 From: Mas Azalya Date: Mon, 2 Nov 2026 16:56:39 +0800 Subject: [PATCH 2/5] DEV-1395: RELEASING.md checks the signing key against published releases ShimmerCapture is not enrolled in Play App Signing, so there is no upload key certificate in Play Console to compare with. Records the certificate every release is signed with (checked against the published 1.3.3 APK), how to read it from Play's App bundle explorer, and that enrolling is not part of a release. Co-Authored-By: Claude Opus 5.5 --- .../shimmerServiceExample/RELEASING.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md b/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md index 03df855..64a54a8 100644 --- a/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md +++ b/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md @@ -56,10 +56,21 @@ To check the signing and the version before publishing anything: A dry run does everything up to the signed APK and stops. Open the run to check: -- **build** → *Collect and check the APK* prints the APK's `versionCode` and `versionName`, and - `V2 Signer: certificate SHA-256 digest`. That digest must match Play Console → ShimmerCapture → - *Test and release* → *App integrity* → **Upload key certificate**, which shows it in capitals with - colons (`5F:35:3C:…`). If it doesn't match, Play rejects the upload. +- **build** → *Collect and check the APK* prints the APK's `versionCode` and `versionName`, and its + `certificate SHA-256 digest` (apksigner labels the line `V2 Signer:` or `Signer #1`). It must be + the certificate every ShimmerCapture release has been signed with: + + ``` + CN=Shimmer + SHA-256 5f353cb90d2452e2d83309837a57b72950003e1470d873899a573e2441123e19 + ``` + + ShimmerCapture is **not** enrolled in Play App Signing, so Play has no separate upload key: it + accepts an update only if it is signed by the same key as the APKs already published, and rejects + it otherwise. To check against Play itself, download the current APK from Play Console → + ShimmerCapture → *Test and release* → *App bundle explorer* → its version code → *Downloads*, and + run `apksigner verify --print-certs` on it. Do not choose any option on *Protected with Play* → + *Manage Play app signing* as part of a release: enrolling cannot be undone. - The APK itself is on the run page under **Artifacts** (`shimmercapture-apk`), to install on a test device. From b9cdb69ca71871efb9f42ac5bffc85b5f0018b96 Mon Sep 17 00:00:00 2001 From: Mas Azalya Date: Mon, 2 Nov 2026 17:09:02 +0800 Subject: [PATCH 3/5] DEV-1395: List the changes since the last ShimmerCapture release in the run summary The build job writes every PR merged since the last ShimmerCapture tag to the run summary, so a dry run gives the material for the Play release notes (whats_new) before anything is tagged. Same PRs as the GitHub release's generated notes, which the read-only build job cannot call: it reads the merge commits, including PRs merged into a branch that later reached master, and needs only pull-requests: read. It never blocks a release. RELEASING.md gains 'Writing whats_new': where the list comes from, how to turn it into user-facing notes (1.3.4's as the example), and the generate-notes command for previewing without a dry run. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-shimmercapture.yml | 34 +++++++++++++++++-- .../shimmerServiceExample/RELEASING.md | 30 ++++++++++++++-- 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-shimmercapture.yml b/.github/workflows/release-shimmercapture.yml index 187b9fb..c8f4fbf 100644 --- a/.github/workflows/release-shimmercapture.yml +++ b/.github/workflows/release-shimmercapture.yml @@ -16,8 +16,9 @@ # # One run does, in order, and creates nothing public until the APK has built and is signed: # build reads the version; fails if it is already tagged, if versionCode did not go up since the -# last ShimmerCapture release, or if the app is not set to PUBLIC; builds the signed -# release APK. Read-only (no keystore without it): it also runs, unsigned, on PRs. +# last ShimmerCapture release, or if the app is not set to PUBLIC; lists the PRs since +# that release in the run summary, to write whats_new from; builds the signed release +# APK. Read-only (no keystore without it): it also runs, unsigned, on PRs. # release tags ShimmerCapture_v on the commit it built and creates the GitHub # pre-release with the APK and notes since the previous ShimmerCapture release. # Pre-release, so the Android API release stays "Latest", as before. @@ -41,7 +42,7 @@ # GITHUB_TOKEN, or PACKAGES_READ_TOKEN if that is ever refused. # # dry_run builds the signed APK (unsigned without the keystore) and keeps it as a workflow artifact, -# from any branch, and publishes nothing. The workflow also dry-runs on any PR that changes this file. +# from any branch, and publishes nothing. Its summary lists the changes for whats_new. The workflow also dry-runs on any PR that changes this file. name: Release ShimmerCapture @@ -79,6 +80,7 @@ jobs: permissions: contents: read packages: read + pull-requests: read # PR titles, for the changes list in the run summary env: DRY_RUN: ${{ github.event_name != 'workflow_dispatch' || inputs.dry_run }} # Read by the repositories in the root build.gradle to resolve the driver. @@ -159,6 +161,32 @@ jobs: } >> "$GITHUB_OUTPUT" echo "Releasing ShimmerCapture $VERSION (versionCode $VERSION_CODE) as $TAG against driver ${DRIVER:-unknown}; notes since ${PREVIOUS_TAG:-the first commit}" + # The material for the Play release notes (whats_new), so a dry run shows it before the real + # run. Same PRs as the GitHub release's generated notes, which this read-only job cannot call: + # every merged PR since the last ShimmerCapture tag, including those merged into a branch that + # later reached master. Squash merges are matched by their "(#N)" suffix. + - name: List the changes since the last release + continue-on-error: true # only informs; never blocks a release + working-directory: . + env: + GH_TOKEN: ${{ github.token }} + PREVIOUS_TAG: ${{ steps.version.outputs.previous_tag }} + VERSION: ${{ steps.version.outputs.version }} + run: | + range=${PREVIOUS_TAG:+refs/tags/$PREVIOUS_TAG..}HEAD + numbers=$(git log --reverse --format=%s "$range" \ + | sed -nE 's/^Merge pull request #([0-9]+) .*/\1/p; s/.*\(#([0-9]+)\)$/\1/p' | awk '!seen[$0]++') + { + echo "### Changes in ShimmerCapture $VERSION since ${PREVIOUS_TAG:-the first commit}" + echo + echo "Pick the ones users notice for the Play release notes (whats_new, 500 characters max)." + echo + for n in $numbers; do + gh api "repos/$GITHUB_REPOSITORY/pulls/$n" --jq '"* \(.title) (#\(.number))"' || echo "* #$n" + done + [ -n "$numbers" ] || echo "No merged PRs found." + } >> "$GITHUB_STEP_SUMMARY" + # Decoded before building so a missing keystore fails in seconds. The keystore is written # outside the checkout, and the step that uses it deletes it. Never on a PR: the build runs the # PR's own Gradle scripts, which could read it. diff --git a/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md b/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md index 64a54a8..6972702 100644 --- a/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md +++ b/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md @@ -49,13 +49,17 @@ Then, as before the workflow existed: ## 2. Optional: a dry run -To check the signing and the version before publishing anything: +To check the signing and the version, and to get the list of changes for the release notes, before +publishing anything: 1. **Actions** → **Release ShimmerCapture** → **Run workflow**. 2. Branch `master`, tick **dry_run**, then **Run workflow**. A dry run does everything up to the signed APK and stops. Open the run to check: +- The run's **summary** page lists every PR merged since the last ShimmerCapture release: the same + list the GitHub release's notes will have. Write the Play release notes from it (see + *Writing whats_new* below). - **build** → *Collect and check the APK* prints the APK's `versionCode` and `versionName`, and its `certificate SHA-256 digest` (apksigner labels the line `V2 Signer:` or `Signer #1`). It must be the certificate every ShimmerCapture release has been signed with: @@ -76,6 +80,28 @@ A dry run does everything up to the signed APK and stops. Open the run to check: A dry run can be started from any branch, so it is also the way to try an uprev before merging it. +### Writing whats_new + +The GitHub release gets its notes automatically: every PR since the last release. The Play release +notes (`whats_new`) are for users, at most 500 characters, so they are written by hand from that +list. Most PRs (CI, HIL tests, docs, release tooling) do not change the app: keep the ones users +notice, in plain words, one bullet each. For example, 1.3.4's: + +``` +• Connecting over Bluetooth LE no longer freezes the app while the link is set up +• A device is shown as ready only once it has fully connected +• More reliable streaming: fixes for device replies and acknowledgements that could be lost or misread +• Fixed a crash when a device disconnected while a command was being sent +• Updated Shimmer device library (0.11.12) +``` + +Without a dry run, the same list is one command away. It creates nothing; put in the version being +released and the last one: + +```bash +gh api repos/ShimmerResearch/ShimmerAndroidAPI/releases/generate-notes -f tag_name=ShimmerCapture_v1.3.5 -f target_commitish=master -f previous_tag_name=ShimmerCapture_v1.3.4 --jq .body +``` + ## 3. Run the release 1. **Actions** → **Release ShimmerCapture** → **Run workflow**. @@ -85,7 +111,7 @@ A dry run can be started from any branch, so it is also the way to try an uprev |---|---| | Use workflow from | `master` (a release refuses any other branch) | | google_play | ticked, to put a draft release in Google Play. Unticked = GitHub release only | - | whats_new | the Play release notes, in English, at most 500 characters. Blank = "Bug fixes and improvements." Copying the previous release's notes and editing them works well | + | whats_new | the Play release notes, in English, at most 500 characters. Blank = "Bug fixes and improvements." See *Writing whats_new* above | | dry_run | unticked | 3. **Run workflow**, and wait for the three jobs, about 10 minutes: From 736f5e2199c9eb9240a214f28de176c12b60f2dc Mon Sep 17 00:00:00 2001 From: Mas Azalya Date: Tue, 3 Nov 2026 12:48:45 +0800 Subject: [PATCH 4/5] DEV-1395: Address the #147 review - Collect and check the APK fails unless a signed APK carries the ShimmerCapture release certificate (RELEASE_CERT_SHA256), before anything is tagged or uploaded. RELEASING.md drops the by-eye check. - The previous release is the newest published ShimmerCapture release whose tag still exists. A tagless release made the versionCode check and the changes list compare against nothing. - The changes list runs with pipefail and says so when git log fails, instead of "No merged PRs found"; it matches merge commits only, and reads every title in one GraphQL request. - RELEASING.md no longer promises the summary and generate-notes lists are identical, and says both are of master as it is when looked at. - Wrap the long header line. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-shimmercapture.yml | 78 ++++++++++++++----- .../shimmerServiceExample/RELEASING.md | 39 +++++----- 2 files changed, 80 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release-shimmercapture.yml b/.github/workflows/release-shimmercapture.yml index c8f4fbf..bbc2ef9 100644 --- a/.github/workflows/release-shimmercapture.yml +++ b/.github/workflows/release-shimmercapture.yml @@ -42,7 +42,8 @@ # GITHUB_TOKEN, or PACKAGES_READ_TOKEN if that is ever refused. # # dry_run builds the signed APK (unsigned without the keystore) and keeps it as a workflow artifact, -# from any branch, and publishes nothing. Its summary lists the changes for whats_new. The workflow also dry-runs on any PR that changes this file. +# from any branch, and publishes nothing. Its summary lists the changes for whats_new. The workflow +# also dry-runs on any PR that changes this file. name: Release ShimmerCapture @@ -121,8 +122,19 @@ jobs: fi TAG="ShimmerCapture_v$VERSION" - PREVIOUS_TAG=$(gh release list --repo "$GITHUB_REPOSITORY" --limit 200 --json tagName,createdAt \ - --jq '[.[] | select(.tagName | startswith("ShimmerCapture_v"))] | sort_by(.createdAt) | last | .tagName // ""') + # The newest published ShimmerCapture release whose tag still exists. A draft, or a release + # whose tag was deleted, has no tag to compare against: the versionCode check below and + # the changes list would then silently compare against nothing. + PREVIOUS_TAG= + for t in $(gh release list --repo "$GITHUB_REPOSITORY" --limit 200 --json tagName,createdAt,isDraft \ + --jq '[.[] | select((.tagName | startswith("ShimmerCapture_v")) and (.isDraft | not))] + | sort_by(.createdAt) | reverse | .[].tagName'); do + if git rev-parse -q --verify "refs/tags/$t" >/dev/null; then + PREVIOUS_TAG=$t + break + fi + echo "::warning::The $t release has no tag, so it is skipped as the previous release." + done fail() { if [ "$DRY_RUN" = true ]; then @@ -162,9 +174,10 @@ jobs: echo "Releasing ShimmerCapture $VERSION (versionCode $VERSION_CODE) as $TAG against driver ${DRIVER:-unknown}; notes since ${PREVIOUS_TAG:-the first commit}" # The material for the Play release notes (whats_new), so a dry run shows it before the real - # run. Same PRs as the GitHub release's generated notes, which this read-only job cannot call: - # every merged PR since the last ShimmerCapture tag, including those merged into a branch that - # later reached master. Squash merges are matched by their "(#N)" suffix. + # run. The GitHub release's generated notes need write access this job does not have, so the + # PRs are found from the merge commits ("Merge pull request #N …") since the last + # ShimmerCapture tag, including PRs merged into a branch that later reached master. This repo + # merges with merge commits; a squash-merged PR would not be listed. - name: List the changes since the last release continue-on-error: true # only informs; never blocks a release working-directory: . @@ -173,19 +186,34 @@ jobs: PREVIOUS_TAG: ${{ steps.version.outputs.previous_tag }} VERSION: ${{ steps.version.outputs.version }} run: | + set -o pipefail # a failing git log must not read as "no PRs" + summary() { echo "$1" >> "$GITHUB_STEP_SUMMARY"; } + summary "### Changes in ShimmerCapture $VERSION since ${PREVIOUS_TAG:-the first commit}" + summary "" range=${PREVIOUS_TAG:+refs/tags/$PREVIOUS_TAG..}HEAD - numbers=$(git log --reverse --format=%s "$range" \ - | sed -nE 's/^Merge pull request #([0-9]+) .*/\1/p; s/.*\(#([0-9]+)\)$/\1/p' | awk '!seen[$0]++') - { - echo "### Changes in ShimmerCapture $VERSION since ${PREVIOUS_TAG:-the first commit}" - echo - echo "Pick the ones users notice for the Play release notes (whats_new, 500 characters max)." - echo - for n in $numbers; do - gh api "repos/$GITHUB_REPOSITORY/pulls/$n" --jq '"* \(.title) (#\(.number))"' || echo "* #$n" - done - [ -n "$numbers" ] || echo "No merged PRs found." - } >> "$GITHUB_STEP_SUMMARY" + if ! numbers=$(git log --reverse --format=%s "$range" \ + | sed -nE 's/^Merge pull request #([0-9]+) .*/\1/p' | awk '!seen[$0]++'); then + echo "::warning::Could not list the commits in $range." + summary "Could not list the changes: \`git log $range\` failed. See this step's log." + exit 1 + fi + if [ -z "$numbers" ]; then + summary "No PRs merged since ${PREVIOUS_TAG:-the first commit}." + exit 0 + fi + # Every title in one GraphQL request, rather than one REST call per PR. + query="query(\$owner: String!, \$name: String!) { repository(owner: \$owner, name: \$name) {" + for n in $numbers; do query+=" pr$n: pullRequest(number: $n) { number title }"; done + query+=" } }" + titles=$(gh api graphql -f query="$query" -F owner="${GITHUB_REPOSITORY%/*}" \ + -F name="${GITHUB_REPOSITORY#*/}" --jq '.data.repository[] | select(.) | "\(.number)\t\(.title)"') \ + || echo "::warning::Could not read the PR titles; listing numbers only." + summary "Pick the ones users notice for the Play release notes (whats_new, 500 characters max)." + summary "" + for n in $numbers; do + title=$(awk -F'\t' -v n="$n" '$1 == n { print $2; exit }' <<<"$titles") + summary "* ${title:-(title not found)} (#$n)" + done # Decoded before building so a missing keystore fails in seconds. The keystore is written # outside the checkout, and the step that uses it deletes it. Never on a PR: the build runs the @@ -250,6 +278,10 @@ jobs: VERSION: ${{ steps.version.outputs.version }} VERSION_CODE: ${{ steps.version.outputs.version_code }} SIGNED: ${{ steps.keystore.outputs.signed }} + # SHA-256 of the certificate every ShimmerCapture release on Google Play is signed with + # (CN=Shimmer). The app is not enrolled in Play App Signing, so Play accepts only APKs signed + # by this key. Change it only if the app's signing key itself changes. + RELEASE_CERT_SHA256: 5f353cb90d2452e2d83309837a57b72950003e1470d873899a573e2441123e19 run: | out=shimmerServiceExample/build/outputs/apk/release ls -l "$out" @@ -270,8 +302,16 @@ jobs: echo "::error::The APK does not carry versionName $VERSION and versionCode $VERSION_CODE." exit 1 fi + # Before anything is tagged or uploaded: a wrong or replaced keystore secret would otherwise + # be caught only by Play, after the tag and GitHub release are public. if [ "$SIGNED" = true ]; then - "$build_tools/apksigner" verify --print-certs "../release-assets/$name" + certs=$("$build_tools/apksigner" verify --print-certs "../release-assets/$name") + echo "$certs" + if ! grep -qi "certificate SHA-256 digest: $RELEASE_CERT_SHA256" <<<"$certs"; then + echo "::error::The APK is not signed with the ShimmerCapture release key (SHA-256 $RELEASE_CERT_SHA256). Check the SHIMMERCAPTURE_KEYSTORE_* secrets." + exit 1 + fi + echo "Signed with the ShimmerCapture release key." fi echo "apk=$name" >> "$GITHUB_OUTPUT" diff --git a/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md b/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md index 6972702..8de2a88 100644 --- a/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md +++ b/ShimmerAndroidInstrumentDriver/shimmerServiceExample/RELEASING.md @@ -57,24 +57,21 @@ publishing anything: A dry run does everything up to the signed APK and stops. Open the run to check: -- The run's **summary** page lists every PR merged since the last ShimmerCapture release: the same - list the GitHub release's notes will have. Write the Play release notes from it (see - *Writing whats_new* below). -- **build** → *Collect and check the APK* prints the APK's `versionCode` and `versionName`, and its - `certificate SHA-256 digest` (apksigner labels the line `V2 Signer:` or `Signer #1`). It must be - the certificate every ShimmerCapture release has been signed with: - - ``` - CN=Shimmer - SHA-256 5f353cb90d2452e2d83309837a57b72950003e1470d873899a573e2441123e19 - ``` +- The run's **summary** page lists the PRs merged since the last ShimmerCapture release, found from + the merge commits between that release's tag and the commit being built. Write the Play release + notes from it (see *Writing whats_new* below). +- **build** → *Collect and check the APK* prints the APK's `versionCode` and `versionName`, and + **checks its signing certificate**: the run fails, before anything is tagged or uploaded, unless + the APK is signed with the key every ShimmerCapture release has used (`CN=Shimmer`, SHA-256 + `5f353cb9…41123e19`, in the workflow as `RELEASE_CERT_SHA256`). ShimmerCapture is **not** enrolled in Play App Signing, so Play has no separate upload key: it - accepts an update only if it is signed by the same key as the APKs already published, and rejects - it otherwise. To check against Play itself, download the current APK from Play Console → - ShimmerCapture → *Test and release* → *App bundle explorer* → its version code → *Downloads*, and - run `apksigner verify --print-certs` on it. Do not choose any option on *Protected with Play* → - *Manage Play app signing* as part of a release: enrolling cannot be undone. + accepts an update only if it is signed by the same key as the APKs already published. If the check + fails, the `SHIMMERCAPTURE_KEYSTORE_*` secrets hold a different keystore. To compare with Play + itself, download the current APK from Play Console → ShimmerCapture → *Test and release* → + *App bundle explorer* → its version code → *Downloads*, and run `apksigner verify --print-certs` on + it. Do not choose any option on *Protected with Play* → *Manage Play app signing* as part of a + release: enrolling cannot be undone. - The APK itself is on the run page under **Artifacts** (`shimmercapture-apk`), to install on a test device. @@ -95,13 +92,18 @@ notice, in plain words, one bullet each. For example, 1.3.4's: • Updated Shimmer device library (0.11.12) ``` -Without a dry run, the same list is one command away. It creates nothing; put in the version being -released and the last one: +Without a dry run, GitHub's own notes preview is one command away. It creates nothing; put in the +version being released and the last one: ```bash gh api repos/ShimmerResearch/ShimmerAndroidAPI/releases/generate-notes -f tag_name=ShimmerCapture_v1.3.5 -f target_commitish=master -f previous_tag_name=ShimmerCapture_v1.3.4 --jq .body ``` +Both lists are of `master` as it is when you look. If a PR merges before the release run, it is in +the APK but not in your notes: look again just before running. The two lists also find PRs +differently (merge commits, against GitHub's own commit-to-PR links), so they can differ, e.g. for +a squash-merged PR. + ## 3. Run the release 1. **Actions** → **Release ShimmerCapture** → **Run workflow**. @@ -159,6 +161,7 @@ already created is not created twice. | `versionCode N is not higher than M` | `versionName` was raised but `versionCode` wasn't. Raise it in a new uprev PR | | `MainActivity.appReleaseType is …, not PUBLIC` | Set it back to `PUBLIC` in a PR | | `No SHIMMERCAPTURE_KEYSTORE_BASE64 secret` | The signing secrets are missing. See *Secrets* below | +| `The APK is not signed with the ShimmerCapture release key` | The keystore secret holds a different key from the one Play knows. Nothing was published. Replace `SHIMMERCAPTURE_KEYSTORE_BASE64` (and its passwords and alias) with the original keystore, see *Secrets* below | | `The APK does not carry versionName …` | The build didn't pick up `build.gradle`'s values. Check for a version override in Gradle files | | **play**: `No GOOGLE_PLAY_SERVICE_ACCOUNT_JSON secret` | The Play secret is missing. The GitHub release is done; upload by hand (step 4), or add the secret and re-run the job | | **play**: `The caller does not have permission` | The service account lacks access to ShimmerCapture in Play Console, or was just added: new permissions can take a day. Re-run the play job later | From 2a606995ffadb0df941b6536de715824a8c10b35 Mon Sep 17 00:00:00 2001 From: Mas Azalya Date: Tue, 3 Nov 2026 13:01:02 +0800 Subject: [PATCH 5/5] DEV-1395: Address the #147 re-review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The version step lists the releases by assignment before looping. In "for t in $(gh …)" a failed gh was ignored under -e, leaving no previous tag and so skipping the versionCode check again. - The changes list runs jq on the GraphQL response itself. When one PR in the query can't be resolved, gh exits 1 and prints the raw response without applying --jq, so every title was lost; now only that PR's is. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release-shimmercapture.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-shimmercapture.yml b/.github/workflows/release-shimmercapture.yml index bbc2ef9..44e98f5 100644 --- a/.github/workflows/release-shimmercapture.yml +++ b/.github/workflows/release-shimmercapture.yml @@ -125,10 +125,13 @@ jobs: # The newest published ShimmerCapture release whose tag still exists. A draft, or a release # whose tag was deleted, has no tag to compare against: the versionCode check below and # the changes list would then silently compare against nothing. + # An assignment, so -e stops the step if gh fails: inside "for … in $(…)" a failure is ignored, + # and the versionCode check would be skipped. + releases=$(gh release list --repo "$GITHUB_REPOSITORY" --limit 200 --json tagName,createdAt,isDraft \ + --jq '[.[] | select((.tagName | startswith("ShimmerCapture_v")) and (.isDraft | not))] + | sort_by(.createdAt) | reverse | .[].tagName') PREVIOUS_TAG= - for t in $(gh release list --repo "$GITHUB_REPOSITORY" --limit 200 --json tagName,createdAt,isDraft \ - --jq '[.[] | select((.tagName | startswith("ShimmerCapture_v")) and (.isDraft | not))] - | sort_by(.createdAt) | reverse | .[].tagName'); do + for t in $releases; do if git rev-parse -q --verify "refs/tags/$t" >/dev/null; then PREVIOUS_TAG=$t break @@ -205,9 +208,12 @@ jobs: query="query(\$owner: String!, \$name: String!) { repository(owner: \$owner, name: \$name) {" for n in $numbers; do query+=" pr$n: pullRequest(number: $n) { number title }"; done query+=" } }" - titles=$(gh api graphql -f query="$query" -F owner="${GITHUB_REPOSITORY%/*}" \ - -F name="${GITHUB_REPOSITORY#*/}" --jq '.data.repository[] | select(.) | "\(.number)\t\(.title)"') \ - || echo "::warning::Could not read the PR titles; listing numbers only." + # jq runs separately: when any PR in the query can't be resolved, gh exits 1 and prints the + # raw response without applying --jq, though every other title in it is there. + resp=$(gh api graphql -f query="$query" -F owner="${GITHUB_REPOSITORY%/*}" \ + -F name="${GITHUB_REPOSITORY#*/}") || echo "::warning::Some PR titles could not be read." + titles=$(jq -r '.data.repository // {} | .[] | select(.) | "\(.number)\t\(.title)"' <<<"$resp") \ + || titles= summary "Pick the ones users notice for the Play release notes (whats_new, 500 characters max)." summary "" for n in $numbers; do