upgrade jetpack version #5
This file contains 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: Run build on main | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-write-only: true | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
with: | |
packages: 'tools platform-tools build-tools;35.0.0 platforms;android-35 platforms;android-31' | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
# - name: Build with Gradle | |
# run: ./gradlew build | |
- name: Build Debug APK | |
run: ./gradlew assembleDebug | |
# Build release APK | |
- name: Build Release APK | |
run: ./gradlew assembleRelease | |
# Upload artifacts | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: app-debug.apk | |
path: app/build/outputs/apk/debug/app-debug.apk | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: app-release.apk | |
path: app/build/outputs/apk/release/app-release.apk | |
# # Create draft release | |
# - name: Create Draft Release | |
# id: create_release | |
# uses: actions/create-release@v2 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# generate_notes: true | |
# draft: false | |
# Upload APK to release | |
- name: Upload APK to Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: app/build/outputs/apk/release/app-release.apk | |
asset_name: app-release.apk | |
owner: ${{ github.actor }} | |
repo: ${{ github.event.repository.name }} |