auto_implementer.py JSON 파싱 개선 #44
This file contains hidden or 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 CD | |
| on: | |
| push: | |
| branches: [ "develop", "release/*" ] | |
| pull_request: | |
| branches: [ "feature/*" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Create local.properties | |
| run: | | |
| echo "DEV_BASE_URL=$DEV_BASE_URL" > local.properties | |
| echo "PROD_BASE_URL=$PROD_BASE_URL" >> local.properties | |
| echo "key_alias=$key_alias" >> local.properties | |
| echo "key_password=$key_password" >> local.properties | |
| echo "store_password=$store_password" >> local.properties | |
| echo "o_auth_web_client_id=$o_auth_web_client_id" >> local.properties | |
| shell: bash | |
| env: | |
| DEV_BASE_URL: ${{ secrets.DEV_BASE_URL }} | |
| PROD_BASE_URL: ${{ secrets.PROD_BASE_URL }} | |
| key_alias: ${{ secrets.ALIAS }} | |
| key_password: ${{ secrets.KEY_PASSWORD }} | |
| store_password: ${{ secrets.KEY_STORE_PASSWORD }} | |
| o_auth_web_client_id: ${{ secrets.O_AUTH_WEB_CLIENT_ID }} | |
| - name: Decode keystore and create jks | |
| run: echo "${{ secrets.SIGNING_KEY }}" | base64 --decode > nextroom_key | |
| - name: Load Google Service file | |
| run: echo $DATA | base64 -di > app/google-services.json | |
| env: | |
| DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
| - name: Build clean | |
| run: ./gradlew clean | |
| - name: Run Android lint | |
| run: ./gradlew lint | |
| - name: Build assemble debug apk | |
| if: (github.event_name == 'pull_request' && startsWith(github.ref, 'refs/heads/feature/')) | |
| run: ./gradlew assembleDebug --stacktrace | |
| - name: Build assemble release aab | |
| if: startsWith(github.ref, 'refs/heads/release/') | |
| run: ./gradlew bundleRelease --stacktrace | |
| - name: Upload Debug APK | |
| if: github.event_name == 'pull_request' && startsWith(github.ref, 'refs/heads/feature/') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debug | |
| path: ./app/build/outputs/apk/debug/app-debug.apk | |
| - name: Upload Release APK | |
| if: startsWith(github.ref, 'refs/heads/release/') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release | |
| path: ./app/build/outputs/bundle/release/app-release.aab | |
| - name: Upload apk to Firebase App Distribution | |
| if: github.event_name == 'pull_request' && startsWith(github.ref, 'refs/heads/feature/') | |
| uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
| with: | |
| appId: ${{ secrets.FIREBASE_APP_ID }} | |
| serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} | |
| groups: testers | |
| file: app/build/outputs/apk/debug/app-debug.apk | |
| - name: Notify Slack about new distribution | |
| if: github.event_name == 'pull_request' && startsWith(github.ref, 'refs/heads/feature/') | |
| run: | | |
| curl -X POST -H 'Content-type: application/json' \ | |
| --data "{ | |
| \"text\": \"🔥 Firebase Distribution 업로드 완료! \n🔧 브랜치: ${GITHUB_REF##*/}\n🔗 커밋: ${GITHUB_SHA}\" | |
| }" \ | |
| "$SLACK_WEBHOOK_URL_FIREBASE_DISTRIBUTION" | |
| env: | |
| SLACK_WEBHOOK_URL_FIREBASE_DISTRIBUTION: ${{ secrets.SLACK_WEBHOOK_URL_FIREBASE_DISTRIBUTION }} | |
| - name: Publish to Play Store | |
| if: startsWith(github.ref, 'refs/heads/release/') | |
| uses: r0adkll/upload-google-play@v1 | |
| with: | |
| serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
| packageName: com.nextroom.nextroom | |
| releaseFiles: app/build/outputs/bundle/release/app-release.aab | |
| track: internal | |
| status: draft |