Fix release signing in CI: anchor plugin regex to buildTypes release block
All checks were successful
build-apk / build (push) Successful in 35m3s
All checks were successful
build-apk / build (push) Successful in 35m3s
The signing plugin added a release{} inside signingConfigs{}, so the debug-line
replacement matched that block instead of the release BUILD TYPE — CI produced
debug-signed APKs (would break Obtainium updates vs the release-signed v0.1.0).
Anchor on `buildTypes { ... release {`. Verified locally: release buildType now
uses the release key when BBP_UPLOAD_* is set. Also unify keystore path via
github.workspace in both steps.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7970678b90
commit
5d269bf2a3
2 changed files with 5 additions and 4 deletions
|
|
@ -34,10 +34,11 @@ module.exports = function withReleaseSigning(config) {
|
|||
`signingConfigs {${SIGNING_BLOCK}`,
|
||||
);
|
||||
// 2) Point the release buildType at the release key when its env is set, else
|
||||
// debug. Replace the RN template's unconditional debug line inside the
|
||||
// release {} block (otherwise it overrides the release config).
|
||||
// debug. Anchor on `buildTypes { … release {` so we hit the release
|
||||
// BUILD TYPE's debug line — not the `release {}` we just added inside
|
||||
// signingConfigs {} (which would leave release builds on the debug key).
|
||||
gradle = gradle.replace(
|
||||
/(release \{[\s\S]*?)signingConfig signingConfigs\.debug/,
|
||||
/(buildTypes \{[\s\S]*?release \{[\s\S]*?)signingConfig signingConfigs\.debug/,
|
||||
`$1signingConfig System.getenv("BBP_UPLOAD_STORE_FILE") != null ? signingConfigs.release : signingConfigs.debug`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue