name: CI-Android APK env: main_project_module: app playstore_name: KeepassFidelity on: push: branches: [ release ] tags: - '**' pull_request: branches: [ release ] workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: gradle/wrapper-validation-action@v2 - name: create and checkout branch if: github.event_name == 'pull_request' env: BRANCH: ${{ github.head_ref }} run: git checkout -B "$BRANCH" - name: set up JDK uses: actions/setup-java@v4 with: java-version: 17 distribution: "temurin" cache: 'gradle' - name: Build APK run: ./gradlew assemble - name: Upload APK uses: actions/upload-artifact@v4 with: name: app.apk path: app/build/outputs/apk/release/app-release-unsigned.apk - name: Release uses: softprops/action-gh-release@v2 with: files: | app.apk app/build/outputs/apk/release/app-release-unsigned.apk