fixing how apk rename is done

This commit is contained in:
2025-07-03 19:55:45 -04:00
parent 9f0a5621a5
commit 5c8aba6466
2 changed files with 15 additions and 19 deletions

View File

@@ -65,26 +65,14 @@ jobs:
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: lchat-${{ steps.tag.outputs.tag }}
path: app/build/outputs/apk/release/app-release.apk
name: localchat-${{ steps.tag.outputs.tag }}
path: app/build/outputs/apk/release/localchat-*-release.apk
# Step 8: Clean up keystore
- name: Clean up keystore
if: always()
run: rm -f ${{ github.workspace }}/keystore.jks
# Step 9: Run tests (optional but recommended)
- name: Run Unit Tests
run: ./gradlew test
# Step 10: Upload test results
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: app/build/test-results/
release:
name: Create GitHub Release
needs: build
@@ -106,12 +94,20 @@ jobs:
- name: Download APK
uses: actions/download-artifact@v4
with:
name: lchat-${{ steps.tag.outputs.tag }}
name: localchat-${{ steps.tag.outputs.tag }}
path: ./artifacts
# Step 4: Rename APK file
- name: Rename APK
run: mv ./artifacts/app-release.apk ./artifacts/lchat-${{ steps.tag.outputs.tag }}.apk
run: |
# Find the APK file (should be localchat-*-release.apk)
APK_FILE=$(find ./artifacts -name "localchat-*-release.apk" | head -n 1)
if [ -z "$APK_FILE" ]; then
echo "Error: No APK file found"
exit 1
fi
# Rename to include tag version
mv "$APK_FILE" "./artifacts/localchat-${{ steps.tag.outputs.tag }}.apk"
# Step 5: Create GitHub Release
- name: Create Release
@@ -120,7 +116,7 @@ jobs:
tag_name: ${{ steps.tag.outputs.tag }}
name: Release ${{ steps.tag.outputs.tag }}
body: |
## LChat Release
## LocalChat Release
### What's New
- Built from commit: ${{ github.sha }}
@@ -136,7 +132,7 @@ jobs:
---
*This release was automatically generated by GitHub Actions*
files: ./artifacts/lchat-${{ steps.tag.outputs.tag }}.apk
files: ./artifacts/localchat-${{ steps.tag.outputs.tag }}.apk
draft: false
prerelease: false