Update README.md #143
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 Build | |
on: | |
push: | |
branches: [ develop, master ] | |
# pull_request: | |
# branches: [ develop ] | |
jobs: | |
apk: | |
runs-on: ubuntu-latest | |
# android ๋๋ ํ ๋ฆฌ ์์ฐ์ผ๋ก ์ธํ ์ฃผ์ ์ฒ๋ฆฌ | |
# env: | |
# working-directory: ./android | |
steps: | |
# Check Current Branches | |
- uses: actions/checkout@v2 | |
# JDK ์ค์ | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
# Android SDK ์ค์ | |
# - name: SetUp Android SDK | |
# uses: android-actions/setup-android@v2 | |
# Dependency ์ ๋ฒ์ ๋ฐ ๋ฆด๋ฆฌ์ฆ ๋ฉ์์ง ๊ฐ์ ธ์ค๊ธฐ working-directory -> ๋ฆฌํฌ์งํ ๋ฆฌ ํน์ฑ์ android ์์ ๋น๋ํด์ผ ๋์ ์ถ๊ฐํจ | |
- name: Release Version | |
id: release | |
run: | | |
echo ::set-output name=code::$(grep versionCode buildSrc/src/main/java/Dependency.kt | awk '{print $5}') | |
echo ::set-output name=name::$(grep versionName buildSrc/src/main/java/Dependency.kt | awk '{print $5}') | |
# Tag ๋ช "" ์ ๊ฑฐํด์ ๊ฐ์ ธ์ค๊ธฐ | |
- name: Get Version Name | |
id: version_name | |
run: echo ::set-output name=val::${{steps.release.outputs.name}} | |
- name: Get Version Code | |
id: version_code | |
run: echo ::set-output name=val::${{steps.release.outputs.code}} | |
- name: Print version | |
run: echo "Version ${{steps.version_code.outputs.val}}_${{steps.version_name.outputs.val}}" | |
# gradlew ๊ถํ ํ๋ | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
# working-directory: ${{ env.working-directory }} | |
# Android Build Debug: assembleDebug Release: assembleRelease | |
- name: Android Build | |
run: ./gradlew clean assembleDebug | |
# working-directory: ${{ env.working-directory }} | |
# Debg Upload Apk | |
- name: Debug Apk | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Generate Debug Apk | |
path: app/build/outputs/apk/debug/til_${{steps.version_code.outputs.val}}_${{steps.version_name.outputs.val}}-debug.apk | |