Skip to content

Commit

Permalink
Update mobile-prod.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
evereq authored Oct 26, 2023
1 parent 827c555 commit af9d255
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .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 @@ -53,5 +55,28 @@ 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_SERVICE_ACCOUNT }}
run: cd apps/mobile && eas submit -p android --latest --key ${{ secrets.GOOGLE_CREDENTIALS }}

0 comments on commit af9d255

Please sign in to comment.