tools for exporting godot projects via Github Actions
-rw-r--r--.github/actions/export-android/action.yml5
-rw-r--r--.github/actions/export-linux/action.yml5
-rw-r--r--.github/actions/export-mac/action.yml5
-rw-r--r--.github/actions/export-web/action.yml5
-rw-r--r--.github/actions/export-windows/action.yml5
-rw-r--r--.github/actions/setup-godot/action.yml2
-rw-r--r--.github/workflows/callable-export.yml100
7 files changed, 121 insertions, 6 deletions
diff --git a/.github/actions/export-android/action.yml b/.github/actions/export-android/action.yml
index 747097e..db92eef 100644
--- a/.github/actions/export-android/action.yml
+++ b/.github/actions/export-android/action.yml
@@ -65,7 +65,10 @@ runs:
- name: Add extra files
if: steps.get-export-name.outputs.export-name
run: |
- [[ -f .github/post_export ]] && chmod +x .github/post_export && .github/post_export android
+ if [[ -f .github/post_export ]]; then
+ chmod +x .github/post_export
+ ./.github/post_export android
+ fi
shell: bash
- name: Upload
diff --git a/.github/actions/export-linux/action.yml b/.github/actions/export-linux/action.yml
index 430af0a..b79a1a8 100644
--- a/.github/actions/export-linux/action.yml
+++ b/.github/actions/export-linux/action.yml
@@ -25,7 +25,10 @@ runs:
- name: Add extra files
if: steps.get-export-name.outputs.export-name
run: |
- [[ -f .github/post_export ]] && chmod +x .github/post_export && ./.github/post_export linux
+ if [[ -f .github/post_export ]]; then
+ chmod +x .github/post_export
+ ./.github/post_export linux
+ fi
shell: bash
- uses: actions/upload-artifact@v3
diff --git a/.github/actions/export-mac/action.yml b/.github/actions/export-mac/action.yml
index e56d58e..c25788f 100644
--- a/.github/actions/export-mac/action.yml
+++ b/.github/actions/export-mac/action.yml
@@ -25,7 +25,10 @@ runs:
- name: Add extra files
if: steps.get-export-name.outputs.export-name
run: |
- [[ -f .github/post_export ]] && chmod +x .github/post_export && ./.github/post_export mac
+ if [[ -f .github/post_export ]]; then
+ chmod +x .github/post_export
+ ./.github/post_export mac
+ fi
shell: bash
- name: Upload
diff --git a/.github/actions/export-web/action.yml b/.github/actions/export-web/action.yml
index 7045531..f8f80d8 100644
--- a/.github/actions/export-web/action.yml
+++ b/.github/actions/export-web/action.yml
@@ -35,7 +35,10 @@ runs:
- name: Add extra files
if: steps.get-export-name.outputs.export-name
run: |
- [[ -f .github/post_export ]] && chmod +x .github/post_export && ./.github/post_export web
+ if [[ -f .github/post_export ]]; then
+ chmod +x .github/post_export
+ ./.github/post_export web
+ fi
shell: bash
- name: Upload
diff --git a/.github/actions/export-windows/action.yml b/.github/actions/export-windows/action.yml
index d8beb94..bff93c0 100644
--- a/.github/actions/export-windows/action.yml
+++ b/.github/actions/export-windows/action.yml
@@ -27,7 +27,10 @@ runs:
- name: Add extra files
if: steps.get-export-name.outputs.export-name
run: |
- [[ -f .github/post_export ]] && chmod +x .github/post_export && ./.github/post_export windows
+ if [[ -f .github/post_export ]]; then
+ chmod +x .github/post_export
+ ./.github/post_export windows
+ fi
shell: bash
- name: Upload
diff --git a/.github/actions/setup-godot/action.yml b/.github/actions/setup-godot/action.yml
index e70378c..e37d948 100644
--- a/.github/actions/setup-godot/action.yml
+++ b/.github/actions/setup-godot/action.yml
@@ -43,7 +43,7 @@ runs:
ls "${HOME}/${TEMPLATES_PATH}"| tr '\n' ' '
# gpm
- if [[ -f godot.package ]] && chmod +x .github/post_export; then
+ if [[ -f godot.package ]]; then
[[ ! -d addons ]] && mkdir addons
git clone --depth 1 https://github.com/you-win/godot-package-manager
mv godot-package-manager/addons/godot-package-manager addons/
diff --git a/.github/workflows/callable-export.yml b/.github/workflows/callable-export.yml
new file mode 100644
index 0000000..eafc02a
--- /dev/null
+++ b/.github/workflows/callable-export.yml
@@ -0,0 +1,100 @@
+name: "export"
+on:
+ workflow_call:
+ inputs:
+ godot-version:
+ default: 3.5
+ required: true
+ type: number
+ image:
+ default: ghcr.io/bend-n/godot-2d:3.5
+ type: string
+ required: true
+ export-name:
+ default: ${{ github.event.repository.name }}
+ required: true
+ type: string
+ platforms: # space seperated platform list
+ default: "windows linux web android mac"
+ required: true
+ type: string
+ secrets:
+ android-keystore-base64: # will be filled with andrid debug keystore if left blank
+ required: false
+ android-keystore-password:
+ required: false
+ butler-api-key:
+ required: false
+
+env:
+ GODOT_VERSION: ${{ inputs.godot-version }}
+ NAME: ${{ inputs.export-name }}
+
+jobs:
+ linux:
+ runs-on: ubuntu-latest
+ if: contains(${{ inputs.platforms }}, ${{ github.job }})
+ container:
+ image: ${{ inputs.image }}
+ name: Linux
+ steps:
+ - name: Build
+ uses: bend-n/godot-actions/.github/actions/export-linux@main
+
+ windows:
+ runs-on: ubuntu-latest
+ if: contains(${{ inputs.platforms }}, ${{ github.job }})
+ container:
+ image: ${{ inputs.image }}
+ name: Windows
+ steps:
+ - name: Build
+ uses: bend-n/godot-actions/.github/actions/export-windows@main
+
+ mac:
+ runs-on: ubuntu-latest
+ if: contains(${{ inputs.platforms }}, ${{ github.job }})
+ container:
+ image: ${{ inputs.image }}
+ name: macOS
+ steps:
+ - name: Build
+ uses: bend-n/godot-actions/.github/actions/export-mac@main
+
+ web:
+ runs-on: ubuntu-latest
+ if: contains(${{ inputs.platforms }}, ${{ github.job }})
+ container:
+ image: ${{ inputs.image }}
+ name: HTML5
+ steps:
+ - name: Build
+ uses: bend-n/godot-actions/.github/actions/export-web@main
+
+ android:
+ runs-on: ubuntu-latest
+ if: contains(${{ inputs.platforms }}, ${{ github.job }})
+ container:
+ image: ${{ inputs.image }}
+ name: Android
+ steps:
+ - name: Build
+ uses: bend-n/godot-actions/.github/actions/export-android@main
+ with:
+ android-keystore-base64: ${{ secrets.android-keystore-base64 }}
+ android-password: ${{ secrets.android-keystore-password }}
+
+ push-itch:
+ needs: [linux, android, windows, mac, web]
+ name: Push to itch.io
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Check for api key
+ id: secret
+ run: echo '::set-output name=secret::${{ secrets.butler-api-key }}'
+
+ - name: Push
+ if: steps.secret.outputs.secret
+ uses: bend-n/godot-actions/.github/actions/itch-push@main
+ with:
+ api-key: ${{ secrets.butler-api-key }}