1 Commits

230 changed files with 65 additions and 89 deletions
+21 -58
View File
@@ -2,43 +2,39 @@ name: Android
on: on:
push: push:
tags: branches:
- "v*" - main
jobs: jobs:
android: android:
runs-on: godot runs-on: godot
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
lfs: true
- name: Godot version - name: Godot version
run: godot --version
- name: Prepare Godot
run: | run: |
rm -rf .godot godot --version
godot \
--headless \ - name: Java version
--path . \ run: |
--editor \ java -version
--quit \
--verbose
- name: Android SDK
run: |
adb version
- name: Build APK - name: Build APK
run: | run: |
mkdir -p build mkdir -p build
godot \
--headless \
--path . \
--editor \
--quit
godot \ godot \
--headless \ --headless \
--path . \ --path . \
@@ -46,47 +42,14 @@ jobs:
build/app.apk build/app.apk
- name: Check imported resources
run: |
echo "=== PNG imports ==="
find .godot/imported -iname '*habitable*' -o -iname '*civ2*'
echo "=== PNG files ==="
ls -lh ui/4-life/habitable_planet.png
ls -lh ui/4-life/civ2.png
- name: Verify APK - name: Verify APK
run: | run: |
test -f build/app.apk test -f build/app.apk
ls -lh build/app.apk ls -lh build/app.apk
- name: Create Release
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
curl -f \
-X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"https://gt.owad.ru/api/v1/repos/K/owniverse/releases" \
-d "{
\"tag_name\": \"${GITHUB_REF_NAME}\",
\"name\": \"${GITHUB_REF_NAME}\",
\"body\": \"Android build ${GITHUB_REF_NAME}\"
}"
- name: Upload APK to Release - name: Upload APK
env: uses: actions/upload-artifact@v4
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }} with:
run: | name: android-apk
RELEASE_ID=$(curl -fsS \ path: build/app.apk
-H "Authorization: token ${GITEA_TOKEN}" \
"https://gt.owad.ru/api/v1/repos/K/owniverse/releases/tags/${GITHUB_REF_NAME}" \
| python3 -c 'import sys,json; print(json.load(sys.stdin)["id"])')
curl -f \
-X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-F "attachment=@build/app.apk" \
"https://gt.owad.ru/api/v1/repos/K/owniverse/releases/${RELEASE_ID}/assets?name=owniverse-${GITHUB_REF_NAME}.apk"
+1
View File
@@ -0,0 +1 @@
uid://dojk16crca3cx
View File

Some files were not shown because too many files have changed in this diff Show More