mirror of
https://github.com/awatertrevi/xamarin-neo4j.git
synced 2026-09-22 09:05:29 +00:00
Fix Play Store workflow YAML syntax, extract version script
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
21
.github/workflows/deploy-playstore.yml
vendored
21
.github/workflows/deploy-playstore.yml
vendored
@@ -42,26 +42,7 @@ jobs:
|
||||
PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
|
||||
run: |
|
||||
pip install google-api-python-client google-auth --quiet
|
||||
VERSION_CODE=$(python3 - <<'EOF'
|
||||
import json, os
|
||||
from googleapiclient.discovery import build
|
||||
from google.oauth2 import service_account
|
||||
|
||||
creds = service_account.Credentials.from_service_account_info(
|
||||
json.loads(os.environ['PLAY_SERVICE_ACCOUNT_JSON']),
|
||||
scopes=['https://www.googleapis.com/auth/androidpublisher']
|
||||
)
|
||||
service = build('androidpublisher', 'v3', credentials=creds)
|
||||
edit = service.edits().insert(packageName='nl.resoftware.pocketgraph', body={}).execute()
|
||||
bundles = service.edits().bundles().list(
|
||||
packageName='nl.resoftware.pocketgraph',
|
||||
editId=edit['id']
|
||||
).execute()
|
||||
service.edits().delete(packageName='nl.resoftware.pocketgraph', editId=edit['id']).execute()
|
||||
max_code = max([b['versionCode'] for b in bundles.get('bundles', [])], default=0)
|
||||
print(max_code + 1)
|
||||
EOF
|
||||
)
|
||||
VERSION_CODE=$(python3 .github/scripts/get_version_code.py)
|
||||
sed -i "s/android:versionCode=\"[^\"]*\"/android:versionCode=\"$VERSION_CODE\"/" \
|
||||
Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Android/Properties/AndroidManifest.xml
|
||||
echo "version_code=$VERSION_CODE" >> $GITHUB_OUTPUT
|
||||
|
||||
Reference in New Issue
Block a user