-
Notifications
You must be signed in to change notification settings - Fork 6
feat: support for empty app name and android.injected.signing properties #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3f426e3
8f91b6c
e3f4f83
1ef36f7
1585a4a
5b6b0c4
ce0e10c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,10 +183,18 @@ runs: | |
| run: | | ||
| mkdir -p $HOME/.gradle | ||
| touch $HOME/.gradle/gradle.properties | ||
| echo "RNEF_UPLOAD_STORE_FILE=${{ inputs.keystore-store-file }}" >> $HOME/.gradle/gradle.properties | ||
| echo "RNEF_UPLOAD_STORE_PASSWORD=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties | ||
| echo "RNEF_UPLOAD_KEY_ALIAS=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties | ||
| echo "RNEF_UPLOAD_KEY_PASSWORD=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties | ||
|
|
||
| # Android standard properties (auto-recognized by AGP) | ||
| echo "android.injected.signing.store.file=${{ inputs.keystore-store-file }}" >> $HOME/.gradle/gradle.properties | ||
| echo "android.injected.signing.store.password=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties | ||
| echo "android.injected.signing.key.alias=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties | ||
| echo "android.injected.signing.key.password=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties | ||
|
|
||
| # Rock custom properties (for apps that explicitly read them in signingConfigs) | ||
| echo "ROCK_UPLOAD_STORE_FILE=${{ inputs.keystore-store-file }}" >> $HOME/.gradle/gradle.properties | ||
| echo "ROCK_UPLOAD_STORE_PASSWORD=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties | ||
| echo "ROCK_UPLOAD_KEY_ALIAS=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties | ||
| echo "ROCK_UPLOAD_KEY_PASSWORD=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties | ||
| shell: bash | ||
|
|
||
| - name: Determine Android sourceDir and appName | ||
|
|
@@ -204,15 +212,25 @@ runs: | |
| - name: Decode and store keystore file | ||
| if: ${{ !env.ARTIFACT_URL && inputs.sign }} | ||
| run: | | ||
| KEYSTORE_TARGET_PATH="$ANDROID_SOURCE_DIR/$APP_NAME/${{ inputs.keystore-path }}" | ||
| if [ -n "$APP_NAME" ]; then | ||
| KEYSTORE_TARGET_PATH="$ANDROID_SOURCE_DIR/$APP_NAME/${{ inputs.keystore-path }}" | ||
| else | ||
| KEYSTORE_TARGET_PATH="$ANDROID_SOURCE_DIR/${{ inputs.keystore-path }}" | ||
| fi | ||
|
|
||
| echo "Keystore target path before normalizing: $KEYSTORE_TARGET_PATH" | ||
| KEYSTORE_TARGET_PATH=$(realpath -m "$KEYSTORE_TARGET_PATH") | ||
| echo "Keystore target path after normalizing: $KEYSTORE_TARGET_PATH" | ||
|
Comment on lines
221
to
223
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's this about, why do we need normalization like this? seems quite brittle
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have to set the path like that in the params: Without normalization we ended up having: With normalization we have proper path:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, can we use
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done ✅ |
||
| mkdir -p "$(dirname "$KEYSTORE_TARGET_PATH")" || { | ||
| echo "Failed to create keystore directory: $(dirname "$KEYSTORE_TARGET_PATH")" | ||
| exit 1 | ||
| } | ||
| if [ -n "${{ inputs.keystore-file }}" ]; then | ||
| cp "${{ inputs.keystore-file }}" "$KEYSTORE_TARGET_PATH" | ||
| echo "Successfully copied keystore file to target path: $KEYSTORE_TARGET_PATH" | ||
| else | ||
| echo "${{ inputs.keystore-base64 }}" | base64 --decode > "$KEYSTORE_TARGET_PATH" | ||
| echo "Successfully copied keystore base64 to target path: $KEYSTORE_TARGET_PATH" | ||
| fi | ||
| shell: bash | ||
| working-directory: ${{ inputs.working-directory }} | ||
|
|
@@ -312,7 +330,11 @@ runs: | |
| if: ${{ !env.ARTIFACT_URL && inputs.sign }} | ||
| run: | | ||
| rm $HOME/.gradle/gradle.properties | ||
| rm "$ANDROID_SOURCE_DIR/$APP_NAME/${{ inputs.keystore-path }}" | ||
| if [ -n "$APP_NAME" ]; then | ||
| rm "$ANDROID_SOURCE_DIR/$APP_NAME/${{ inputs.keystore-path }}" | ||
| else | ||
| rm "$ANDROID_SOURCE_DIR/${{ inputs.keystore-path }}" | ||
| fi | ||
| shell: bash | ||
| working-directory: ${{ inputs.working-directory }} | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add mapping:
inputs.keystore-key-alias