Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload releases #8

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 9 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down