disallow cleartext traffic for release builds (allow only for debug) … #916
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 Debug APK | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| paths-ignore: | |
| - '**.md' | |
| - '**.yml' | |
| - '**.xml' | |
| pull_request_review: | |
| paths-ignore: | |
| - '**.md' | |
| types: submitted | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: 'Check out repository' | |
| uses: 'actions/checkout@v4' | |
| - name: 'Set up Java 17' | |
| uses: 'actions/setup-java@v4' | |
| with: | |
| java-version: 17 | |
| distribution: 'adopt' | |
| - name: 'Setup Gradle' | |
| uses: 'gradle/actions/setup-gradle@v4' | |
| with: | |
| add-job-summary: 'on-failure' | |
| - name: 'Build Debug APK' | |
| run: ./gradlew assembleDebug | |
| - name: 'Sign Apk' | |
| continue-on-error: true | |
| id: sign_apk | |
| uses: r0adkll/sign-android-release@v1 | |
| with: | |
| releaseDir: app/build/outputs/apk/debug | |
| signingKeyBase64: ${{ secrets.KEY_BASE64 }} | |
| alias: ${{ secrets.KEY_ALIAS }} | |
| keyStorePassword: ${{ secrets.KEYSTORE_PASS }} | |
| keyPassword: ${{ secrets.KEYSTORE_PASS }} | |
| - name: Remove file that aren't signed | |
| continue-on-error: true | |
| run: | | |
| ls | grep 'signed\.apk$' && find . -type f -name '*.apk' ! -name '*-signed.apk' -delete | |
| - name: Upload the APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debug | |
| path: app/build/outputs/apk/debug/app-debug*.apk |