[feat/#140] udpate CI logic & add CD logic #2
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: Android CI | |
on: | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Gradle cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Build assemble release apk | |
run: ./gradlew assembleRelease | |
merge-branch: | |
permissions: | |
checks: write | |
contents: write | |
pull-requests: write | |
needs: build-and-test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Merge staging -> develop | |
uses: devmasx/merge-branch@master | |
with: | |
type: now | |
target_branch: 'develop' | |
github_token: ${{ secrets.GITHUB_TOKEN }} |