forked from vbarthel-fr/maestro-e2e-set-orientation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff46de2
commit e660ab4
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
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 assembleDebug | ||
|
||
- name: Upload Android artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: setOrientation.apk | ||
path: app/build/outputs/apk/debug/app-debug.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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env sh | ||
set -eu | ||
|
||
# Upload Android app | ||
UPLOAD_PATH="gs://mobile.dev/cli_e2e" | ||
|
||
cd app/build/outputs/apk/debug | ||
cp app-debug.apk setOrientation.apk | ||
cd - | ||
|
||
gsutil cp app/build/outputs/apk/debug/setOrientation.apk "$UPLOAD_PATH/setOrientation.apk" | ||
gsutil acl ch -r -u AllUsers:R "$UPLOAD_PATH/setOrientation.apk" |