Skip to content

Merge pull request #13 from ondosee/feature/11-publishing-main-page #22

Merge pull request #13 from ondosee/feature/11-publishing-main-page

Merge pull request #13 from ondosee/feature/11-publishing-main-page #22

name: Ondosee Android CI
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
sdk-version: [ 26, 35 ]
max-parallel: 2
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Gradle caching
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{runner.os}}-gradle-${{hashFiles('**/*.gradle*', '**/gradle-wrapper.properties')}}
restore-keys: |
${{runner.os}}-gradle-
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v2
with:
api-level: ${{ matrix.sdk-version }}
components: build-tools;30.0.3
licenses: android-sdk-license-5be876d5
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create LOCAL_PROPERTIES
run: echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties
- name: Create google-services.json
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: Build with Gradle
run: ./gradlew build
- name: OhNalMwo Android CI Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ success() }}
with:
title: ✅ Ondosee-Android-CI 성공! ✅
webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }}
status: ${{ job.status }}
image: ${{ secrets.SUCCESS_IMAGE }}
description: "온도도씨~"
color: 00FF00
url: "https://github.com/sarisia/actions-status-discord"
username: OhNalMwo CI 봇
sender: "OhNalMwo CI 봇"
- name: OhNalMwo Android CI Discord Notification
uses: sarisia/actions-status-discord@v1
if: ${{ failure() }}
with:
title: ❗️ Ondosee-Android-CI 실패!
webhook: ${{ secrets.ONDOSEE_DISCORD_WEBHOOK }}
status: ${{ job.status }}
image: ${{ secrets.FAILED_IMAGE }}
description: "오날뭐?"
color: 00FF00
url: "https://github.com/sarisia/actions-status-discord"
username: OhNalMwo CI 봇
sender: "OhNalMwo CI 봇"