Skip to content

Commit

Permalink
Merge pull request #1660 from ever-co/Sergemuhundu-patch-1
Browse files Browse the repository at this point in the history
CI/CD into Google Play Store
  • Loading branch information
evereq authored Oct 26, 2023
2 parents 6a1036d + af9d255 commit 01cd3fb
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/mobile-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
deploy:
runs-on: ubuntu-latest

environment: prod

permissions:
contents: read

Expand Down Expand Up @@ -52,3 +54,29 @@ jobs:

- name: Publish update
run: cd apps/mobile && eas update --auto

- name: Decode Google Credentials
run: |
DECODED_GOOGLE_CREDENTIALS=$(echo '${{ secrets.GOOGLE_CREDENTIALS }}' | base64 --decode)
echo "DECODED_GOOGLE_CREDENTIALS=$DECODED_GOOGLE_CREDENTIALS" >> $GITHUB_ENV
echo "::add-mask::$DECODED_GOOGLE_CREDENTIALS"
ESCAPED_GOOGLE_CREDENTIALS=$(echo "$DECODED_GOOGLE_CREDENTIALS" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')
ESCAPED_GOOGLE_CREDENTIALS=$(echo $ESCAPED_GOOGLE_CREDENTIALS | sed 's/\\n/\\\\n/g')
echo "ESCAPED_GOOGLE_CREDENTIALS=$ESCAPED_GOOGLE_CREDENTIALS" >> $GITHUB_ENV
echo "::add-mask::$ESCAPED_GOOGLE_CREDENTIALS"
# See https://github.com/ever-co/ever-teams-boards-store/blob/develop/.github/workflows/deploy.yml

- name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v1"
with:
credentials_json: ${{ env.DECODED_GOOGLE_CREDENTIALS }}

# Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`.

Check warning on line 75 in .github/workflows/mobile-prod.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (gcloud)

Check warning on line 75 in .github/workflows/mobile-prod.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (gcloud)
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"

Check warning on line 77 in .github/workflows/mobile-prod.yml

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (gcloud)
with:
project_id: "ever-teams-399720"

- name: Upload to Play Store Console
run: cd apps/mobile && eas submit -p android --latest --key ${{ secrets.GOOGLE_CREDENTIALS }}

0 comments on commit 01cd3fb

Please sign in to comment.