Release debug APK as main installable file #9
Workflow file for this run
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 & Release APK | |
| on: | |
| push: | |
| branches: [main] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build Debug APK | |
| run: ./gradlew assembleDebug | |
| - name: Build Release APK | |
| run: ./gradlew assembleRelease | |
| - name: Sign Release APK | |
| uses: r0adkll/sign-android-release@v1 | |
| id: sign_app | |
| with: | |
| releaseDirectory: app/build/outputs/apk/release | |
| signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
| alias: ${{ secrets.KEY_ALIAS }} | |
| keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
| keyPassword: ${{ secrets.KEY_PASSWORD }} | |
| env: | |
| BUILD_TOOLS_VERSION: "34.0.0" | |
| continue-on-error: true | |
| - name: Upload Debug APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: oo-chat-debug | |
| path: app/build/outputs/apk/debug/app-debug.apk | |
| - name: Upload Signed Release APK | |
| if: steps.sign_app.outcome == 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: oo-chat-release-signed | |
| path: ${{ steps.sign_app.outputs.signedReleaseFile }} | |
| - name: Upload Unsigned Release APK | |
| if: steps.sign_app.outcome != 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: oo-chat-release-unsigned | |
| path: app/build/outputs/apk/release/app-release-unsigned.apk | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download Debug APK | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: oo-chat-debug | |
| - name: Try download signed release | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: oo-chat-release-signed | |
| continue-on-error: true | |
| id: download_signed | |
| - name: Try download unsigned release | |
| if: steps.download_signed.outcome != 'success' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: oo-chat-release-unsigned | |
| continue-on-error: true | |
| - name: Get version from tag | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Rename APKs | |
| run: | | |
| mv app-debug.apk oo-chat-${{ steps.get_version.outputs.VERSION }}.apk | |
| # Try to find and rename release APK if it exists | |
| if [ -f "app-release-signed.apk" ]; then | |
| mv app-release-signed.apk oo-chat-${{ steps.get_version.outputs.VERSION }}-release.apk | |
| elif [ -f "app-release-unsigned.apk" ]; then | |
| mv app-release-unsigned.apk oo-chat-${{ steps.get_version.outputs.VERSION }}-unsigned.apk | |
| fi | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: OO Chat Android v${{ steps.get_version.outputs.VERSION }} | |
| body: | | |
| ## OO Chat Android v${{ steps.get_version.outputs.VERSION }} | |
| Native Android chat client for ConnectOnion agents. | |
| ### Download | |
| - **oo-chat-${{ steps.get_version.outputs.VERSION }}.apk** - Ready to install | |
| ### Features | |
| - Connect to agents by address (0x...) | |
| - Ed25519 signed messages | |
| - Real-time streaming (tool calls, thinking, responses) | |
| - Multi-turn conversations with session persistence | |
| ### Installation | |
| 1. Download the APK file | |
| 2. Enable "Install from unknown sources" in Android settings | |
| 3. Open the APK to install | |
| files: | | |
| oo-chat-${{ steps.get_version.outputs.VERSION }}.apk | |
| oo-chat-${{ steps.get_version.outputs.VERSION }}-release.apk | |
| oo-chat-${{ steps.get_version.outputs.VERSION }}-unsigned.apk | |
| fail_on_unmatched_files: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |