chore: bump app version #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' # Trigger on tags like v1.0.0, v2.1.3, etc. | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| build-android: | |
| name: Build Android APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'gradle' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build Android Debug APK | |
| run: ./gradlew :composeApp:assembleDebug --stacktrace | |
| - name: Decode Keystore | |
| id: decode_keystore | |
| uses: timheuer/base64-to-file@v1.2 | |
| with: | |
| fileName: 'release.jks' | |
| encodedString: ${{ secrets.SIGNING_KEY_STORE_BASE64 }} | |
| - name: Build Android Release APK | |
| env: | |
| SIGNING_STORE_FILE: ${{ steps.decode_keystore.outputs.filePath }} | |
| SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
| SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
| SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
| run: ./gradlew :composeApp:assembleRelease --stacktrace | |
| - name: Upload Debug APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: leoconnect-debug-${{ github.ref_name }} | |
| path: composeApp/build/outputs/apk/debug/*.apk | |
| retention-days: 30 | |
| - name: Upload Release APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: leoconnect-release-${{ github.ref_name }} | |
| path: composeApp/build/outputs/apk/release/*.apk | |
| retention-days: 90 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| composeApp/build/outputs/apk/debug/*.apk | |
| composeApp/build/outputs/apk/release/*.apk | |
| draft: false | |
| prerelease: false | |
| fail_on_unmatched_files: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| build-desktop: | |
| name: Build Desktop Application | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'gradle' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build Desktop Application | |
| run: ./gradlew :composeApp:packageDistributionForCurrentOS --stacktrace | |
| - name: Upload Desktop Build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: leoconnect-desktop-${{ github.ref_name }} | |
| path: composeApp/build/compose/binaries/main/**/* | |
| retention-days: 90 | |
| - name: Upload Desktop Assets to Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| composeApp/build/compose/binaries/main/deb/*.deb | |
| composeApp/build/compose/binaries/main/msi/*.msi | |
| composeApp/build/compose/binaries/main/dmg/*.dmg | |
| draft: false | |
| prerelease: false | |
| fail_on_unmatched_files: false | |
| token: ${{ secrets.GITHUB_TOKEN }} |