mirror of
https://github.com/awatertrevi/xamarin-neo4j.git
synced 2026-10-07 10:04:09 +00:00
Fix Play Store workflow YAML syntax, extract version script
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
8141e55521
commit
d099f72398
@@ -0,0 +1,17 @@
|
|||||||
|
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)
|
||||||
@@ -42,26 +42,7 @@ jobs:
|
|||||||
PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
|
PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
|
||||||
run: |
|
run: |
|
||||||
pip install google-api-python-client google-auth --quiet
|
pip install google-api-python-client google-auth --quiet
|
||||||
VERSION_CODE=$(python3 - <<'EOF'
|
VERSION_CODE=$(python3 .github/scripts/get_version_code.py)
|
||||||
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
|
|
||||||
)
|
|
||||||
sed -i "s/android:versionCode=\"[^\"]*\"/android:versionCode=\"$VERSION_CODE\"/" \
|
sed -i "s/android:versionCode=\"[^\"]*\"/android:versionCode=\"$VERSION_CODE\"/" \
|
||||||
Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Android/Properties/AndroidManifest.xml
|
Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Android/Properties/AndroidManifest.xml
|
||||||
echo "version_code=$VERSION_CODE" >> $GITHUB_OUTPUT
|
echo "version_code=$VERSION_CODE" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user