Skip to content

Commit

Permalink
Seprate step to deploy app
Browse files Browse the repository at this point in the history
  • Loading branch information
AmniX committed Oct 21, 2024
1 parent 266f060 commit fb1221f
Showing 1 changed file with 36 additions and 15 deletions.
51 changes: 36 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ permissions:
contents: read

jobs:
deploy:
deploy-sdk:
name: Deploy SDK
strategy:
matrix:
include:
Expand Down Expand Up @@ -58,17 +59,37 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MEMORY_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
SDK_VERSION: ${GITHUB_REF_NAME#v}
- name: Setup local.properties
run: touch local.properties && echo "TEST_SERVER_URL=$TEST_SERVER_URL" >> local.properties
- name: Build SoundBud!
run: ./gradlew :example-android:assembleDevRelease
- name: Publish SoundBud!
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: example-android/build/outputs/apk/dev/release/example-android-dev-release.apk
asset_name: SoundBud-v$VERSION.apk
tag: $VERSION
make_latest: false
env:
VERSION: ${GITHUB_REF_NAME#v}


deploy-app:
name: Deploy Android App
needs: deploy-sdk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
- uses: actions/cache@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Write release version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
- name: Setup local.properties
run: touch local.properties && echo "TEST_SERVER_URL=$TEST_SERVER_URL" >> local.properties
- name: Build SoundBud!
run: ./gradlew :example-android:assembleDevRelease
- name: Publish SoundBud!
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: example-android/build/outputs/apk/dev/release/example-android-dev-release.apk
asset_name: SoundBud-v$VERSION.apk
tag: $VERSION
make_latest: false
env:
VERSION: ${GITHUB_REF_NAME#v}

0 comments on commit fb1221f

Please sign in to comment.