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

Improved our cd to get the playStore json file from secrets. #189

Merged
merged 1 commit into from
Oct 31, 2024
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
13 changes: 8 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,19 @@ jobs:
- name: Install jq
run: sudo apt-get install -y jq

- name: Set non-kiwix organization tag
run: |
non_kiwix_organization_tag="PLAYSTORE_JSON_${TAG}"
echo "NON_KIWIX_ORGANIZATION_TAG=${non_kiwix_organization_tag}" >> $GITHUB_ENV

- name: Preparing signing material
env:
keystore: ${{ secrets.keystore }}
playstore_json: ${{ secrets.PLAYSTORE_JSON }}
run: |
echo "$keystore" | base64 -d > kiwix-android/kiwix-android.keystore
non_kiwix_organization_tag='PLAYSTORE_JSON_'${TAG}
non_kiwix_playstore_json=${{ secrets[non_kiwix_organization_tag] || '' }}
if [ -n "$non_kiwix_playstore_json" ]; then
echo "$non_kiwix_playstore_json" > kiwix-android/playstore.json
if [ -n "${{ secrets[env.non_kiwix_organization_tag] }}" ]; then
echo "${{ secrets[env.non_kiwix_organization_tag] }}" > kiwix-android/playstore.json
else
echo "$playstore_json" > kiwix-android/playstore.json
fi
Expand Down Expand Up @@ -135,7 +138,7 @@ jobs:

- name: Upload Bundle as an artifact
if: env.should_publish == 'true'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.bundle_name }}
path: ${{ env.bundle_path }}
Expand Down