Skip to content

Commit d08d596

Browse files
authored
fix(ci): pass the release keystore to Gradle as an absolute path (#1426)
The release build has failed since the AGP 9.4.0 bump: Execution failed for task ':apps:flipcash:app:validateSigningRelease'. > Keystore file '/home/runner/.gradle/daemon/9.7.1/key/key' not found for signing config 'externalOverride'. `base64-to-file` reports a workspace-relative `key/key`, which the workflow passed straight through as `android.injected.signing.store.file`. AGP resolves that property against the Gradle daemon's working directory rather than the project, so it looked for the keystore under `~/.gradle/daemon/9.7.1/`. Prefix the path with `github.workspace`. That also retires the second decode into `apps/flipcash/app/key/` — it only existed to cover the module-relative resolution, and nothing in the build reads that location.
1 parent 02928d3 commit d08d596

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

‎.github/workflows/build-fcash2-upload-android.yml‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,14 @@ jobs:
127127
fileDir: ./apps/flipcash/app/src
128128
encodedString: ${{ secrets.FLIPCASH2_GOOGLE_SERVICES }}
129129

130-
- name: Decode Upload Key Store file into location 1
130+
- name: Decode Upload Key Store file
131131
uses: timheuer/base64-to-file@v1
132132
id: signing_key
133133
with:
134134
fileName: key
135135
fileDir: ./key
136136
encodedString: ${{ secrets.UPLOAD_KEY_STORE }}
137137

138-
- name: Decode Upload Key Store file into location 2
139-
uses: timheuer/base64-to-file@v1
140-
with:
141-
fileName: key
142-
fileDir: ./apps/flipcash/app/key
143-
encodedString: ${{ secrets.UPLOAD_KEY_STORE }}
144-
145138
- name: Setup BugSnag API Key
146139
run: echo BUGSNAG_API_KEY=\"${{ secrets.FLIPCASH_BUGSNAG_API_KEY }}\" > ./local.properties
147140

@@ -157,7 +150,10 @@ jobs:
157150
- name: Build release
158151
run: bundle exec fastlane android build_flipcash
159152
env:
160-
STORE_FILE: ${{ steps.signing_key.outputs.filePath }}
153+
# base64-to-file reports a workspace-relative path, and AGP resolves
154+
# android.injected.signing.store.file against the Gradle daemon's working
155+
# directory, not the project — so pass it absolute.
156+
STORE_FILE: ${{ github.workspace }}/${{ steps.signing_key.outputs.filePath }}
161157
STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
162158
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
163159
KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}

0 commit comments

Comments
 (0)