From f81406cdfc9a86ef556180aeedd46637d8b89b40 Mon Sep 17 00:00:00 2001 From: Gimun Kim <101035437+kmkim2689@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:07:34 +0900 Subject: [PATCH] :rocket: release v0.0.1 --- .github/workflows/an-cd.yml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/an-cd.yml b/.github/workflows/an-cd.yml index 9b82f80f..b4e6fddc 100644 --- a/.github/workflows/an-cd.yml +++ b/.github/workflows/an-cd.yml @@ -19,7 +19,7 @@ jobs: cache: 'gradle' - name: Set Up Gradlew Permissions - run: chmod +x gradlew + run: chmod +x ./android/gradlew - name: Create google-services.json env: @@ -56,34 +56,51 @@ jobs: java-version: 17 cache: 'gradle' + - name: Create google-services.json + env: + GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} + run: | + echo $GOOGLE_SERVICES_JSON > ./android/app/google-services.json + + - name: Set up environment variable for BuildConfig + env: + GOOGLE_WEB_CLIENT_ID: ${{ secrets.GOOGLE_WEB_CLIENT_ID }} + BASE_URL_DEV: ${{ secrets.BASE_URL_DEV }} + BASE_URL_API: ${{ secrets.BASE_URL_API }} + run: | + echo google_web_client_id=\"$GOOGLE_WEB_CLIENT_ID\" > ./android/local.properties + echo base_url_dev=\"$BASE_URL_DEV\" >> ./android/local.properties + echo base_url_release=\"$BASE_URL_API\" >> ./android/local.properties + - name: Bumping Version - uses: chkfung/android-version-actions@1.2.3 + uses: chkfung/android-version-actions@v1.2.3 with: gradlePath: ./android/app/build.gradle.kts versionCode: ${{ github.run_number }} - name: Assemble Release Bundle run: ./gradlew bundleRelease + working-directory: ./android - name: Sign app aab - uses: Tlaster/android-sign@v1 + uses: r0adkll/sign-android-release@v1 with: releaseDirectory: ./android/app/build/outputs/bundle/release - signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} # Keystore file base64 - output: ./android/build/release/signed + signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} alias: ${{ secrets.ANDROID_ALIAS }} keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} env: - BUILD_TOOLS_VERSION: "30.0.2" + BUILD_TOOLS_VERSION: "34.0.0" - name: Set Up Authorization with Google Play - run: echo '${{ secrets.ANDROID_PLAY_AUTH }}' > ./android/service_account.json + run: echo '${{ secrets.ANDROID_PLAY_AUTH }}' > service_account.json - name: Deploy AAB to Google Play Console uses: r0adkll/upload-google-play@v1 with: - serviceAccountJsonPlainText: ./android/service_account.json + serviceAccountJsonPlainText: ${{ secrets.ANDROID_PLAY_AUTH }} packageName: net.pengcook.android releaseFiles: ./android/app/build/outputs/bundle/release/app-release.aab track: internal + status: draft