Skip to content

Commit 60757bc

Browse files
committed
fix workflow release
1 parent 9eb1bc4 commit 60757bc

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/fdroid.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
contents: write
9+
710
jobs:
811
build-and-upload:
912
runs-on: ubuntu-latest
@@ -31,24 +34,23 @@ jobs:
3134
run: |
3235
./gradlew clean assembleRelease
3336
34-
- name: Find APK
35-
id: find-apk
37+
- name: Verify APK exists
38+
id: verify-apk
3639
run: |
37-
APK_PATH=$(find composeApp/build/outputs/apk/release -name '*.apk' | head -1)
38-
if [ -z "$APK_PATH" ]; then
39-
echo "ERROR: No APK found!"
40+
APK_PATH="composeApp/build/outputs/apk/release/composeApp-release.apk"
41+
if [ ! -f "$APK_PATH" ]; then
42+
echo "ERROR: APK not found at $APK_PATH"
4043
find . -name '*.apk' || true
4144
exit 1
4245
fi
43-
echo "APK_PATH=$APK_PATH" >> $GITHUB_OUTPUT
44-
echo "Using APK: $APK_PATH"
46+
echo "APK exists at: $APK_PATH"
47+
echo "apk_path=$APK_PATH" >> $GITHUB_OUTPUT
4548
4649
- name: Upload to Release
47-
uses: actions/upload-release-asset@v1
50+
uses: softprops/action-gh-release@v1
51+
with:
52+
files: |
53+
${{ steps.verify-apk.outputs.apk_path }}
54+
draft: false
4855
env:
4956
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
with:
51-
upload_url: ${{ github.event.release.upload_url }}
52-
asset_path: ${{ steps.find-apk.outputs.APK_PATH }}
53-
asset_name: app-release.apk
54-
asset_content_type: application/vnd.android.package-archive

0 commit comments

Comments
 (0)