diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 042392d..c577fc2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,20 +63,28 @@ jobs: run: ./gradlew test deploy: - needs: test runs-on: ubuntu-latest + needs: build steps: - # Step 1 - Download app bundle - - name: Download app bundle from artifact + - name: Checkout branch + uses: actions/checkout@v4 + + - name: Download releases.zip from artifacts uses: actions/download-artifact@v3 with: - name: app-release.aab + name: releases path: ./ + - name: Unzip releases.zip + run: unzip releases.zip + + - name: List extracted files + run: ls -al releases + - name: Publish to Play Store uses: r0adkll/upload-google-play@v1 with: serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} packageName: fr.thomasbernard03.tarot - releaseFiles: ${{ github.workspace }}/app-release.aab + releaseFiles: releases/composeApp-release.aab track: production \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13e2433..79caea4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,17 +35,18 @@ jobs: KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} run: ./gradlew assembleRelease bundleRelease --stacktrace - - name: Upload APK to Artifacts - uses: actions/upload-artifact@v3 - with: - name: app-release.apk - path: composeApp/build/outputs/apk/release/composeApp-release.apk + - name: Create releases.zip + run: | + mkdir releases + cp composeApp/build/outputs/apk/release/composeApp-release.apk releases/ + cp composeApp/build/outputs/bundle/release/composeApp-release.aab releases/ + zip -r releases.zip releases - - name: Upload AAB to Artifacts + - name: Upload releases.zip to Artifacts uses: actions/upload-artifact@v3 with: - name: app-release.aab - path: composeApp/build/outputs/bundle/release/composeApp-release.aab + name: releases + path: releases.zip test: runs-on: ubuntu-latest