Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD into Google Play Store #1660

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
deploy:
runs-on: ubuntu-latest

environment: prod

permissions:
contents: read

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

- 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 }}
Loading