Skip to content

Commit 4dc4c70

Browse files
committed
Switch release workflow to publish debug APK
1 parent 0fa07c4 commit 4dc4c70

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

.github/workflows/android-release.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build-and-release:
10-
name: Build and Publish Release
10+
name: Build and Publish Debug Artifact
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: write
@@ -56,11 +56,11 @@ jobs:
5656
- name: Make Gradle wrapper executable
5757
run: chmod +x gradlew
5858

59-
- name: Build release artifacts (retry up to 3 times)
59+
- name: Build debug artifact (retry up to 3 times)
6060
run: |
6161
attempts=0
6262
until [ "$attempts" -ge 3 ]; do
63-
if ./gradlew --no-daemon clean assembleRelease bundleRelease; then
63+
if ./gradlew --no-daemon clean assembleDebug; then
6464
break
6565
fi
6666
attempts=$((attempts + 1))
@@ -88,38 +88,31 @@ jobs:
8888
env:
8989
VERSION_NAME: ${{ steps.version.outputs.version_name }}
9090
run: |
91-
APK_PATH=app/build/outputs/apk/release/app-release-unsigned.apk
92-
AAB_PATH=app/build/outputs/bundle/release/app-release.aab
91+
APK_PATH=app/build/outputs/apk/debug/app-debug.apk
9392
if [ ! -f "$APK_PATH" ]; then
9493
echo "Expected APK not found at $APK_PATH" >&2
9594
find app/build/outputs -maxdepth 3 -type f || true
9695
exit 1
9796
fi
98-
if [ ! -f "$AAB_PATH" ]; then
99-
echo "Expected AAB not found at $AAB_PATH" >&2
100-
find app/build/outputs -maxdepth 3 -type f || true
101-
exit 1
102-
fi
10397
mkdir -p artifacts
104-
cp "$APK_PATH" "artifacts/AICoreChat-${VERSION_NAME}-unsigned.apk"
105-
cp "$AAB_PATH" "artifacts/AICoreChat-${VERSION_NAME}.aab"
98+
cp "$APK_PATH" "artifacts/AICoreChat-${VERSION_NAME}-debug.apk"
10699
107100
- name: Publish GitHub release
108101
uses: ncipollo/release-action@v1
109102
with:
110103
token: ${{ secrets.GITHUB_TOKEN }}
111-
tag: v${{ steps.version.outputs.version_name }}-build-${{ github.run_number }}
112-
name: AICoreChat v${{ steps.version.outputs.version_name }} (build ${{ github.run_number }})
104+
tag: v${{ steps.version.outputs.version_name }}-debug-build-${{ github.run_number }}
105+
name: AICoreChat v${{ steps.version.outputs.version_name }} Debug (build ${{ github.run_number }})
113106
body: |
114107
## Build Info
115108
- Version: v${{ steps.version.outputs.version_name }} (code ${{ steps.version.outputs.version_code }})
116109
- Commit: ${{ github.sha }}
117110
- Message: ${{ github.event.head_commit.message }}
118111
- Triggered by: ${{ github.actor }} on `${{ github.ref_name }}`
119112
120-
_Generated automatically via GitHub Actions run ${{ github.run_id }}._
113+
_Debug build generated automatically via GitHub Actions run ${{ github.run_id }}._
121114
draft: false
122115
prerelease: false
123-
makeLatest: true
124-
artifacts: artifacts/AICoreChat-${{ steps.version.outputs.version_name }}-unsigned.apk,artifacts/AICoreChat-${{ steps.version.outputs.version_name }}.aab
116+
makeLatest: false
117+
artifacts: artifacts/AICoreChat-${{ steps.version.outputs.version_name }}-debug.apk
125118
artifactContentType: application/octet-stream

0 commit comments

Comments
 (0)