From 48c55dc25447a502a61ed5be4cb21ad6303810c2 Mon Sep 17 00:00:00 2001 From: hyeseon Date: Sun, 27 Oct 2024 16:21:40 +0900 Subject: [PATCH] =?UTF-8?q?[add]=20#312=20keystore=20jks=20=EC=A1=B4?= =?UTF-8?q?=EC=9E=AC=ED=95=98=EB=8A=94=EC=A7=80=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/winey-cd.yml | 70 +++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/.github/workflows/winey-cd.yml b/.github/workflows/winey-cd.yml index 5faf450f..e578f396 100644 --- a/.github/workflows/winey-cd.yml +++ b/.github/workflows/winey-cd.yml @@ -15,42 +15,52 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 17 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Generate winey.keystore.jks + run: echo '${{ secrets.WINEY_KEYSTORE }}' | base64 -d > ./app/winey.jks - - name: Generate winey.keystore.jks - run: echo '${{ secrets.WINEY_KEYSTORE }}' | base64 -d > ./app/winey.jks + - name: Check if winey.jks exists + run: | + if [ -f "./app/winey.jks" ]; then + echo "winey.jks file exists in the app directory." + else + echo "Error: winey.jks file is missing in the app directory." >&2 + exit 1 + fi - - name: Generate local.properties - env: - AUTH_BASE_URL: ${{ secrets.AUTH_BASE_URL }} - KAKAO_NATIVE_KEY: ${{ secrets.KAKAO_NATIVE_KEY }} - AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }} - KEY_ALIAS: ${{ secrets.KEY_ALIAS }} - KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} - STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} - run: | - echo auth.base.url=\"$AUTH_BASE_URL\" >> ./local.properties - echo kakao.native.key=\"$KAKAO_NATIVE_KEY\" >> ./local.properties - echo amplitude.api.key=\"$AMPLITUDE_API_KEY\" >> ./local.properties - echo kakaoNativeKey=$KAKAO_NATIVE_KEY >> ./local.properties - echo keyAlias=$KEY_ALIAS >> ./local.properties - echo keyPassword=$KEY_PASSWORD >> ./local.properties - echo storePassword=$STORE_PASSWORD >> ./local.properties - - name: Create Google Services JSON File - env: - GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: echo $GOOGLE_SERVICES_JSON > ./app/google-services.json + - name: Generate local.properties + env: + AUTH_BASE_URL: ${{ secrets.AUTH_BASE_URL }} + KAKAO_NATIVE_KEY: ${{ secrets.KAKAO_NATIVE_KEY }} + AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }} + KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} + run: | + echo auth.base.url=\"$AUTH_BASE_URL\" >> ./local.properties + echo kakao.native.key=\"$KAKAO_NATIVE_KEY\" >> ./local.properties + echo amplitude.api.key=\"$AMPLITUDE_API_KEY\" >> ./local.properties + echo kakaoNativeKey=$KAKAO_NATIVE_KEY >> ./local.properties + echo keyAlias=$KEY_ALIAS >> ./local.properties + echo keyPassword=$KEY_PASSWORD >> ./local.properties + echo storePassword=$STORE_PASSWORD >> ./local.properties + + - name: Create Google Services JSON File + env: + GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} + run: echo $GOOGLE_SERVICES_JSON > ./app/google-services.json - # PR 제목에서 release v*.*.* 형식의 버전을 추출 + # PR 제목에서 release v*.*.* 형식의 버전을 추출 - name: Extract Version Name run: echo "##[set-output name=version;]v$(echo '${{ github.event.pull_request.title }}' | grep -oP 'release v\K[0-9]+\.[0-9]+\.[0-9]+')" id: extract_version