Skip to content

Commit 3be4dff

Browse files
ci(android): another try
1 parent 2bd581c commit 3be4dff

2 files changed

Lines changed: 27 additions & 20 deletions

File tree

.github/workflows/android-release.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,6 @@ jobs:
7373
exit 1
7474
fi
7575
76-
- name: Create gradle.properties with signing config
77-
env:
78-
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
79-
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
80-
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
81-
run: |
82-
# Create gradle.properties with signing configuration
83-
cat >> android/gradle.properties <<EOF
84-
MYAPP_UPLOAD_STORE_FILE=release.keystore
85-
MYAPP_UPLOAD_STORE_PASSWORD=${KEYSTORE_PASSWORD}
86-
MYAPP_UPLOAD_KEY_ALIAS=${KEY_ALIAS}
87-
MYAPP_UPLOAD_KEY_PASSWORD=${KEY_PASSWORD}
88-
EOF
89-
90-
echo "✓ gradle.properties updated with signing config"
91-
echo "Key alias: ${KEY_ALIAS}"
92-
echo "Keystore path check:"
93-
ls -lh android/app/release.keystore
94-
9576
- name: Make build script executable
9677
run: chmod +x ./scripts/build-release.sh
9778

@@ -163,7 +144,29 @@ jobs:
163144
fi
164145
165146
- name: Build Android App Bundle
166-
run: ./scripts/build-release.sh
147+
env:
148+
ORG_GRADLE_PROJECT_MYAPP_UPLOAD_STORE_FILE: release.keystore
149+
ORG_GRADLE_PROJECT_MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
150+
ORG_GRADLE_PROJECT_MYAPP_UPLOAD_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
151+
ORG_GRADLE_PROJECT_MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
152+
run: |
153+
./scripts/build-release.sh || {
154+
echo "Build failed, checking for detailed errors..."
155+
if [ -f gradle-build.log ]; then
156+
echo "Last 100 lines of gradle output:"
157+
tail -100 gradle-build.log
158+
fi
159+
exit 1
160+
}
161+
162+
# Check if bundle was created
163+
if [ -f android/app/build/outputs/bundle/release/app-release.aab ]; then
164+
echo "✓ Bundle created successfully"
165+
ls -lh android/app/build/outputs/bundle/release/app-release.aab
166+
else
167+
echo "✗ Bundle was not created"
168+
exit 1
169+
fi
167170
168171
- name: Upload build artifact
169172
uses: actions/upload-artifact@v4

android/app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ android {
125125
release {
126126
if (keystoreProperties.getProperty('MYAPP_UPLOAD_STORE_FILE')) {
127127
println "Using release keystore: ${keystoreProperties.getProperty('MYAPP_UPLOAD_STORE_FILE')}"
128+
println "Key alias: ${keystoreProperties.getProperty('MYAPP_UPLOAD_KEY_ALIAS')}"
129+
println "Keystore password length: ${keystoreProperties.getProperty('MYAPP_UPLOAD_STORE_PASSWORD')?.length()}"
130+
println "Key password length: ${keystoreProperties.getProperty('MYAPP_UPLOAD_KEY_PASSWORD')?.length()}"
131+
128132
storeFile file(keystoreProperties.getProperty('MYAPP_UPLOAD_STORE_FILE'))
129133
storePassword keystoreProperties.getProperty('MYAPP_UPLOAD_STORE_PASSWORD')
130134
keyAlias keystoreProperties.getProperty('MYAPP_UPLOAD_KEY_ALIAS')

0 commit comments

Comments
 (0)