#285 [FIX] GitAction 오류 수정 #292
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
# This is a basic workflow to help you get started with Actions | |
name: MumentAndroidCI | |
# Controls when the workflow will run | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
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 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Change gradlew permissions | |
run: chmod +x ./gradlew | |
- name: Touch local properties | |
run: touch local.properties | |
- name: Access BASE_URL | |
env: | |
BASE_URL: ${{ secrets.BASE_URL }} | |
run: echo BASE_URL=\"$BASE_URL\"> ./local.properties | |
- name: Access KAKAO_NATIVE_KEY | |
env: | |
KAKAO_NATIVE_KEY: ${{ secrets.KAKAO_NATIVE_KEY }} | |
run: echo KAKAO_NATIVE_KEY=\"$KAKAO_NATIVE_KEY\"> ./local.properties | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Build APK | |
run: bash ./gradlew assembleDebug --stacktrace | |
- run: './gradlew assembleDebug' | |
- uses: MeilCli/slack-upload-file@v1 | |
with: | |
slack_token: ${{ secrets.SLACK_READ_WRITE_TOKEN }} | |
channels: ${{ secrets.SLACK_CHANNEL_DEPLOY }} | |
file_path: 'app/build/outputs/apk/debug/app-debug.apk' | |
file_name: 'app-debug.apk.apk' | |
file_type: 'apk' | |
initial_comment: '${{ github.ref }} Success Deploy Mument App' | |
- name: Mument apk artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-debug.apk | |
path: app/build/outputs/apk/debug/app-debug.apk | |
- name: action-slack | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: Notify Build | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |