Skip to content

Commit d6ecd49

Browse files
committed
Switch to Release APK with proper naming and signing fallback
1 parent 23ec433 commit d6ecd49

2 files changed

Lines changed: 22 additions & 11 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,23 @@ jobs:
3333
- name: Grant execute permission for gradlew
3434
run: chmod +x gradlew
3535

36-
- name: Build Debug APK
37-
run: ./gradlew assembleDebug --stacktrace --no-daemon
36+
- name: Build Release APK
37+
run: ./gradlew assembleRelease --stacktrace --no-daemon
38+
env:
39+
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
40+
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
41+
42+
- name: Rename and Prepare APK
43+
run: |
44+
mkdir -p release-artifacts
45+
cp app/build/outputs/apk/release/app-release.apk release-artifacts/patchwork-v1.1.0.apk
3846
39-
- name: Upload Debug APK
47+
- name: Upload Release APK Artifact
4048
uses: actions/upload-artifact@v4
4149
with:
42-
name: patchwork-debug-${{ github.sha }}
43-
path: app/build/outputs/apk/debug/app-debug.apk
44-
retention-days: 30
50+
name: patchwork-release-${{ github.sha }}
51+
path: release-artifacts/patchwork-v1.1.0.apk
52+
retention-days: 90
4553

4654
- name: Create or Update Latest Release
4755
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
@@ -50,19 +58,19 @@ jobs:
5058
tag_name: v1.1.0
5159
name: Patchwork v1.1.0 (Latest)
5260
body: |
53-
## 🚀 Latest Development Build
61+
## 🚀 Latest Production Build
5462
5563
**Automatically built from latest commit:** ${{ github.sha }}
5664
5765
### 📦 Download
58-
- **patchwork-debug.apk** - Debug build (recommended for testing)
66+
- **patchwork-v1.1.0.apk** - Official Release Build
5967
6068
### 📝 Recent Changes
6169
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for full version history.
6270
6371
---
64-
*This is an automated build. Download the APK below and install on your Android device.*
65-
files: app/build/outputs/apk/debug/app-debug.apk
72+
*This is an automated production build. Install the APK below on your Android device.*
73+
files: release-artifacts/patchwork-v1.1.0.apk
6674
draft: false
6775
prerelease: false
6876

app/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ android {
5151
getDefaultProguardFile("proguard-android-optimize.txt"),
5252
"proguard-rules.pro"
5353
)
54-
// Only apply release signing if keystore exists
54+
// Apply release signing if keystore exists, otherwise fallback to debug signing
55+
// so that the APK is still installable for testing/pre-release.
5556
val keystoreFile = file("../patchwork-release.keystore")
5657
if (keystoreFile.exists()) {
5758
signingConfig = signingConfigs.getByName("release")
59+
} else {
60+
signingConfig = signingConfigs.getByName("debug")
5861
}
5962
}
6063
}

0 commit comments

Comments
 (0)