diff --git a/.github/workflows/ci.yml b/.github/workflows/android-ci.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/android-ci.yml diff --git a/.github/workflows/android-release-ci.yml b/.github/workflows/android-release-ci.yml new file mode 100644 index 0000000..5790b17 --- /dev/null +++ b/.github/workflows/android-release-ci.yml @@ -0,0 +1,40 @@ +name: Android Release + +on: + push: + tags: + - "v*" + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - 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: Create google-services.json + run: echo "$GOOGLE_SERVICES_JSON" > app/google-services.json + env: + GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} + + - name: Build Release APK + run: ./gradlew assembleRelease + + - name: Create GitHub Release and Upload APK + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + name: Release ${{ github.ref_name }} + files: app/build/outputs/apk/release/app-release.apk + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 33f8152..4e4b63c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -16,8 +16,8 @@ android { applicationId = "com.delecrode.devhub" minSdk = 30 targetSdk = 36 - versionCode = 1 - versionName = "1.0" + versionCode = 2 + versionName = "1.0.2" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }