Create dev-build.yml #1
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: Dev Test Build | |
| on: | |
| push: | |
| branches: [ "dev" ] # Only runs when you push to the dev branch | |
| 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' | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Build Release APK | |
| run: ./gradlew assembleRelease | |
| # Signs the app with your exact production keys so you don't have to uninstall the old one! | |
| - name: Sign APK | |
| uses: ilharp/sign-android-release@v1 | |
| id: sign_app | |
| with: | |
| releaseDir: app/build/outputs/apk/release | |
| signingKeyBase64: ${{ secrets.KEYSTORE }} | |
| alias: ${{ secrets.KEY_ALIAS }} | |
| keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} | |
| keyPassword: ${{ secrets.KEY_PASSWORD }} | |
| # Uploads the file privately to the GitHub run instead of making a public release | |
| - name: Upload Test APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BatteryRemapper-Dev-Test | |
| path: ${{steps.sign_app.outputs.signedFile}} |