mirror of
https://github.com/wismna/DoNext.git
synced 2025-10-03 07:30:13 -04:00
Add Github actions
This commit is contained in:
71
.github/workflows/android.yaml
vendored
Normal file
71
.github/workflows/android.yaml
vendored
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
name: Android CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
BUILD_DIR: app/build/outputs/bundle/release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
|
||||||
|
- name: Replace tokens in build.gradle
|
||||||
|
run: |
|
||||||
|
sed -i 's/#{\(.*\)}/${{\1}}/g' app/build.gradle
|
||||||
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gradle-
|
||||||
|
|
||||||
|
- name: Build AAB
|
||||||
|
run: ./gradlew bundleRelease
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-aab
|
||||||
|
path: ${{ env.BUILD_DIR }}/*release*.aab
|
||||||
|
|
||||||
|
deploy-google-play:
|
||||||
|
needs: build
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: release-aab
|
||||||
|
path: release
|
||||||
|
|
||||||
|
- name: Deploy to Google Play (production)
|
||||||
|
uses: r0adkll/upload-google-play@v1
|
||||||
|
with:
|
||||||
|
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
|
||||||
|
packageName: com.wismna.geoffroy.donext
|
||||||
|
releaseFiles: release/app-release.aab
|
||||||
|
track: beta
|
||||||
|
metadataRootDirectory: fastlane/metadata/android
|
||||||
|
whatsNewDirectory: fastlane/metadata/android/en-US/changelogs
|
||||||
|
status: completed
|
Reference in New Issue
Block a user