fix(ci): executable gradlew, and tag.yml token/permissions - #184
Merged
Merged
Conversation
The dry run reached Gradle and died with "./gradlew: Permission denied". gradlew is mode 100644 in the index — the normal result of a Windows-only checkout, where git does not track the executable bit — so a Linux runner cannot execute it. chmod in the workflow rather than assuming the mode: this fixes CI without touching the tree, and it keeps working whether or not the index mode is corrected later.
Same empty-token bug release.yml just hit: with RELEASE_TOKEN unset,
`token: ${{ secrets.RELEASE_TOKEN }}` resolves to "" and actions/checkout
refuses it before anything runs.
Also raises permissions to contents: write — creating a tag and a GitHub
release is a write, and read-only would have failed at the last step.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 6d472bc. Configure here.
| runs-on: ubuntu-latest | ||
| env: | ||
| GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
| GH_TOKEN: ${{ secrets.RELEASE_TOKEN || github.token }} |
There was a problem hiding this comment.
Missing actions permission for artifact download
High Severity
The job now falls back to github.token with only contents: write, so actions is none. gh run download of another run’s artifacts needs actions: read. When RELEASE_TOKEN is unset, fetch fails with 403 and the tag is never cut.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6d472bc. Configure here.
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.


Two fixes from the first dry run.
./gradlew: Permission deniedgradlewis mode100644in the index. Git on Windows doesn't track the executable bit, so it has never mattered locally — but a Linux runner checks the file out non-executable and can't run it.chmod +x gradlewnow runs immediately before the build.Done in the workflow rather than by changing the index mode, so CI is fixed without touching the tree and stays fixed either way. If you'd rather correct it at the source too,
git update-index --chmod=+x gradlewlocally and commit — thechmodhere is harmless once that lands.tag.ymlhad the same empty-token bugIt still passed
token: ${{ secrets.RELEASE_TOKEN }}with no fallback, so run 2 would have died at checkout exactly like run 1 did. Now falls back toGITHUB_TOKEN.Also raised its
permissionstocontents: write— cutting a tag and creating a release is a write, and it would have failed at the last step under read-only. Worth noting: tags aren't covered by the branch ruleset, so run 2 needs no PAT or App token at all. Only run 1's merge does.What the dry run already proved
Checkout, JDK 17, Android SDK and the keystore check all passed —
compileSdk 37installed fine, and the five signing secrets are correct. R8 andjarsignerare still unproven; this run should reach them.🤖 Generated with Claude Code
https://claude.ai/code/session_01Miqsf1M14nY5TKiZHzyjNY
Note
Low Risk
CI workflow-only changes (build chmod, token fallbacks, permissions); no app runtime or signing logic changes.
Overview
Fixes release CI failures from the first dry run: Linux runners can’t execute
./gradlewbecause the wrapper is checked out as non-executable when the index mode is100644(common when the repo is edited on Windows). The release build step now runschmod +x gradlewimmediately beforebundleRelease, withset -euo pipefailon that step.Run 2 (
tag.yml) no longer hard-requiresRELEASE_TOKEN: checkout andGH_TOKENfall back togithub.token, and job permissions are raised tocontents: writeso tagging and creating the GitHub release can succeed. Comments clarify that tags aren’t covered by the branch ruleset, so run 2 doesn’t need a PAT/App token—only run 1’s merge does.The missing-
RELEASE_TOKENerror inrelease.ymlis updated to describe bypassing the ruleset (fine-grained PAT or GitHub App token), not only “contents + pull-requests write.”Reviewed by Cursor Bugbot for commit 6d472bc. Bugbot is set up for automated code reviews on this repo. Configure here.