fix(release): dry runs no longer require RELEASE_TOKEN - #183
Merged
Merged
Conversation
… is missing A dry run only reads the repo, so requiring RELEASE_TOKEN for it was wrong — an unset secret made actions/checkout fail with "Input required and not supplied: token" before anything useful ran. Checkout and gh now fall back to the job's own GITHUB_TOKEN. A real run still needs the PAT to push and merge, so it is checked explicitly up front with a message that names the secret, rather than failing later mid-push.
`secrets` is not an allowed context in a step-level `if:`, so the guard I just added would not have evaluated as intended. Gate the step on dry_run alone and test the secret in the shell, where it is a normal env var.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first dispatch failed at
actions/checkoutwithInput required and not supplied: token. My bug: I passedtoken: ${{ secrets.RELEASE_TOKEN }}unconditionally, and with the secret unset that resolves to an empty string, which checkout rejects. It never reached a permissions question — a dry run only reads the repo and should never have needed a write credential.ghnow fall back to the job's ownGITHUB_TOKENwhenRELEASE_TOKENis absentThe PAT check lives in the step's shell rather than its
if:—secretsisn't an allowed context in a step condition, so the first version of this guard would not have evaluated as intended.After this,
dry_runworks with no PAT at all.🤖 Generated with Claude Code
https://claude.ai/code/session_01Miqsf1M14nY5TKiZHzyjNY
Note
Low Risk
CI workflow-only changes that improve credential handling and early validation; no app runtime or signing logic changes.
Overview
Dry-run release builds can run without
RELEASE_TOKEN:GH_TOKENand checkout now usesecrets.RELEASE_TOKEN || github.token, so a missing PAT no longer breaksactions/checkoutwith an empty token.Real releases still require the PAT. A new upfront step (only when
dry_runis false) fails fast with a clear error ifRELEASE_TOKENis missing, instead of failing mid-push/merge. The check runs in shell becausesecretscannot be used in stepif:conditions.Signing secrets are validated the same way before the Gradle build: all five keystore/Firebase secrets must be set on every run, with named errors if any are missing.
Workflow header comments were updated to spell out which secrets apply to dry vs full release runs.
Reviewed by Cursor Bugbot for commit a669945. Bugbot is set up for automated code reviews on this repo. Configure here.