Add Android Auto MediaBrowserService to enable app discovery #28
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 Android APK | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| 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 with Gradle | |
| run: ./gradlew assembleDebug --stacktrace | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-debug | |
| path: app/build/outputs/apk/debug/app-debug.apk | |
| if-no-files-found: error | |
| - name: Create Release (on main branch only) | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: build-${{ github.run_number }} | |
| name: Build ${{ github.run_number }} | |
| body: | | |
| Automated build from commit ${{ github.sha }} | |
| Download the APK below and install it on your Android device. | |
| files: app/build/outputs/apk/debug/app-debug.apk | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |