diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml new file mode 100644 index 0000000..869dd43 --- /dev/null +++ b/.github/workflows/release-on-tag.yml @@ -0,0 +1,68 @@ +name: Release APK on Tag + +on: + push: + tags: + - '*' + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Build release APK + run: ./gradlew :app:assembleRelease --no-daemon --stacktrace + + - name: Find APK + id: find_apk + run: | + set -e + APK=$(ls app/build/outputs/apk/release/*.apk | head -n1 || true) + if [ -z "$APK" ]; then + echo "No APK found in app/build/outputs/apk/release" + exit 1 + fi + echo "APK_PATH=$APK" >> $GITHUB_ENV + echo "apk=$APK" + + - name: Upload artifact (for debugging) + uses: actions/upload-artifact@v4 + with: + name: app-release-apk + path: ${{ env.APK_PATH }} + + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + body: Automated release for tag ${{ github.ref_name }} + draft: false + prerelease: false + + - name: Upload APK to Release + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ env.APK_PATH }} + asset_name: app-release.apk + asset_content_type: application/vnd.android.package-archive diff --git a/.gradle/8.5/executionHistory/executionHistory.bin b/.gradle/8.5/executionHistory/executionHistory.bin index 7cf4ed1..1606922 100644 Binary files a/.gradle/8.5/executionHistory/executionHistory.bin and b/.gradle/8.5/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.5/executionHistory/executionHistory.lock b/.gradle/8.5/executionHistory/executionHistory.lock index 5191041..a85ebed 100644 Binary files a/.gradle/8.5/executionHistory/executionHistory.lock and b/.gradle/8.5/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.5/fileHashes/fileHashes.bin b/.gradle/8.5/fileHashes/fileHashes.bin index b6e7a50..4dc751d 100644 Binary files a/.gradle/8.5/fileHashes/fileHashes.bin and b/.gradle/8.5/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.5/fileHashes/fileHashes.lock b/.gradle/8.5/fileHashes/fileHashes.lock index c3ef55c..0b6f11a 100644 Binary files a/.gradle/8.5/fileHashes/fileHashes.lock and b/.gradle/8.5/fileHashes/fileHashes.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 467162b..9e6f275 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index 5b02863..3166d01 100644 Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 68393d6..aa9ec5e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,70 +4,7 @@