diff --git a/.github/workflows/on_push_workflow.yml b/.github/workflows/on_push_workflow.yml index fbaa14d9..3c3b1e1a 100644 --- a/.github/workflows/on_push_workflow.yml +++ b/.github/workflows/on_push_workflow.yml @@ -19,6 +19,7 @@ env: FIREBASE_SERVICE_ACCOUNT_JSON: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} GOOGLE_OAUTH_SERVER_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_SERVER_CLIENT_ID }} GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }} + GOOGLE_PLAY_STORE_SEVICE_ACCOUNT_JSON_BASE64: ${{ secrets.GOOGLE_PLAY_STORE_SEVICE_ACCOUNT_JSON_BASE64 }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} diff --git a/.github/workflows/release_sample_app_workflow.yml b/.github/workflows/release_sample_app_workflow.yml index bc794bd1..e25f2eec 100644 --- a/.github/workflows/release_sample_app_workflow.yml +++ b/.github/workflows/release_sample_app_workflow.yml @@ -17,6 +17,7 @@ env: FIREBASE_SERVICE_ACCOUNT_JSON: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} GOOGLE_OAUTH_SERVER_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_SERVER_CLIENT_ID }} GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }} + GOOGLE_PLAY_STORE_SEVICE_ACCOUNT_JSON_BASE64: ${{ secrets.GOOGLE_PLAY_STORE_SEVICE_ACCOUNT_JSON_BASE64 }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} @@ -52,8 +53,8 @@ jobs: - name: Prepare CI run: make prepare-ci - - name: Prepare keystore file - run: make base64-secret-to-file SECRET=ANDROID_RELEASE_STORE_FILE_BASE64 FILE=sample/mobile-team-android.jks + - name: Prepare sample release + run: make prepare-sample-release - name: Create sample app release bundle run: ./gradlew :sample:bundleRelease @@ -61,7 +62,7 @@ jobs: - name: PlayStore upload uses: r0adkll/upload-google-play@v1.1.3 with: - serviceAccountJson: ./sample/google-services.json + serviceAccountJson: ./sample/google-play-store-service-account.json packageName: com.emarsys.sample releaseFile: sample/build/outputs/bundle/release/sample-release.aab track: alpha diff --git a/Makefile b/Makefile index 1c4298cb..6db60c82 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: base64-secret-to-file build-test check-env help create-sample-release-bundle create-testing-apks lint prepare-ci run-github-workflow-locally test-android-firebase test-android-firebase-emulator release-to-sonatype +.PHONY: base64-secret-to-file build-test check-env help create-sample-release-bundle create-testing-apks lint prepare-ci run-github-workflow-locally test-android-firebase test-android-firebase-emulator release-to-sonatype prepare-sample-release .DEFAULT_GOAL := help SHELL := /bin/bash @@ -48,7 +48,9 @@ prepare-ci: check-env ## setup prerequisites for pipeline prepare-release: check-env ## setup prerequisites for release @./gradlew base64EnvToFile -PpropertyName=SONATYPE_SIGNING_SECRET_KEY_RING_FILE_BASE64 -Pfile=./secring.asc.gpg -prepare-sample-release-key: check-env +prepare-sample-release: check-env ## prepares .jks file for sample release + @./gradlew base64EnvToFile -PpropertyName=ANDROID_RELEASE_STORE_FILE_BASE64 -Pfile=sample/mobile-team-android.jks \ + @./gradlew base64EnvToFile -PpropertyName=GOOGLE_PLAY_STORE_SEVICE_ACCOUNT_JSON_BASE64 -Pfile=sample/google-play-store-service-account.json test-android-firebase-emulator: check-env ## run Android Instrumented tests on emulators on Firebase Test Lab @gcloud firebase test android run \ @@ -74,7 +76,7 @@ test-android-firebase: check-env ## run Android Instrumented tests on real devic run-github-workflow-locally: check-env ## needs act to be installed: `brew install act` and docker running. Pass in workflow path to run @act --secret-file ./workflow.secrets -W $(WORKFLOW_PATH) --container-architecture linux/amd64 -release: check-env prepare-release prepare-sample-release-key ## release to sonatype +release: check-env prepare-release prepare-sample-release ## release to sonatype @./gradlew assembleRelease && ./gradlew publishToSonatype -release-locally: check-env prepare-release prepare-sample-release-key ## release to mavenLocal +release-locally: check-env prepare-release prepare-sample-release ## release to mavenLocal @./gradlew assembleRelease && ./gradlew publishToMavenLocal \ No newline at end of file