Skip to content

fix: try to fix Android CI #101

fix: try to fix Android CI

fix: try to fix Android CI #101

Workflow file for this run

name: "Push Export"
on:
push:
branches:
- main
- feature/godot4
# - staging
# - "feature/**"
env:
GODOT_VERSION: 4.1.1
EXPORT_NAME: godot-game-template
ITCH_IO: false #set to true if you want to enable automatic itch.io deploy
RELEASE_ANDROID: false #set to true if you want to enable automatic android release export
jobs:
export-windows:
if: false
name: Windows Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Windows Build
run: |
mkdir -v -p build/windows
godot -v --headless --export-release "Windows Desktop" ./build/windows/$EXPORT_NAME.exe
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: windows
path: build/windows
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip build/windows
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: windows
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-linux:
if: false
name: Linux Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Linux Build
run: |
mkdir -v -p build/linux
godot -v --headless --export-release "Linux/X11" ./build/linux/$EXPORT_NAME.x86_64
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: linux
path: build/linux
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip build/linux
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: linux
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-web:
if: false
name: Web Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Web Build
run: |
mkdir -v -p build/web
godot -v --headless --export-release "HTML5" ./build/web/index.html
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web
path: build/web
retention-days: 1
# Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail.
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build/web # The folder the action should deploy.
- name: Zip Folder
run: zip -r itch.zip build/web
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: HTML
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-mac:
if: false
name: Mac Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Mac Build
run: |
mkdir -v -p build/mac
godot -v --headless --export-release "Mac OSX" ./build/mac/$EXPORT_NAME.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: mac
path: build/mac
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip build/mac
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: mac
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-android:
name: Android Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mkdir -v -p ~/.config/godot/
ls /root/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
cp /root/.config/godot/editor_settings-4.tres ~/.config/godot/editor_settings-4.tres
echo 'export/android/debug_keystore = "/root/debug.keystore"' >> ~/.config/godot/editor_settings-4.tres
echo 'export/android/android_sdk_path = "/usr/lib/android-sdk"' >> ~/.config/godot/editor_settings-4.tres
- name: Android Debug Build
run: |
mkdir -v -p build/android
godot --verbose --export-debug "Android-CI-job (Do not edit)" ./build/android/$EXPORT_NAME.debug.apk
- name: Android Release Build
if: ${{ env.RELEASE_ANDROID=='true' }}
env:
K8S_SECRET_RELEASE_KEYSTORE_BASE64: ${{ secrets.K8S_SECRET_RELEASE_KEYSTORE_BASE64 }}
K8S_SECRET_RELEASE_KEYSTORE_USER: ${{ secrets.K8S_SECRET_RELEASE_KEYSTORE_USER }}
K8S_SECRET_RELEASE_KEYSTORE_PASSWORD: ${{ secrets.K8S_SECRET_RELEASE_KEYSTORE_PASSWORD }}
run: |
echo $K8S_SECRET_RELEASE_KEYSTORE_BASE64 | base64 --decode > /root/release.keystore
sed 's@keystore/release[[:space:]]*=[[:space:]]*".*"@keystore/release = "/root/release.keystore"@g' -i export_presets.cfg
sed 's@keystore/release_user[[:space:]]*=[[:space:]]*".*"@keystore/release_user="'$K8S_SECRET_RELEASE_KEYSTORE_USER'"@g' -i export_presets.cfg
sed 's@keystore/release_password[[:space:]]*=[[:space:]]*".*"@keystore/release_password="'$K8S_SECRET_RELEASE_KEYSTORE_PASSWORD'"@g' -i export_presets.cfg
godot --verbose --export "Android" ./build/android/$EXPORT_NAME.release.apk
- uses: actions/upload-artifact@v3
with:
name: android
path: build/android
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip build/android
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: android
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip