Add workflow to publish APK #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Build | |
run: ./gradlew --no-daemon assembleRelease | |
- name: Upload Android artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: setOrientation.apk | |
path: app/build/outputs/apk/release/app-release-unsigned.apk | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Authenticate to Google Cloud | |
uses: google-github-actions/auth@v2 | |
with: | |
# These credentials should only have write access to the bucket | |
credentials_json: ${{ secrets.GCP_MOBILEDEV_BUCKET_CREDENTIALS }} | |
- name: Set up Google Cloud CLI | |
uses: google-github-actions/setup-gcloud@v2 | |
with: | |
version: ">= 484.0.0" | |
project_id: perf-dev-289002 | |
- name: Upload apps to public Google Cloud Storage bucket | |
run: ./upload_to_gcs |