tools for exporting godot projects via Github Actions
configurable
| -rw-r--r-- | .github/actions/export-android/action.yml | 6 | ||||
| -rw-r--r-- | .github/actions/export-linux/action.yml | 6 | ||||
| -rw-r--r-- | .github/actions/export-mac/action.yml | 6 | ||||
| -rw-r--r-- | .github/actions/export-web/action.yml | 6 | ||||
| -rw-r--r-- | .github/actions/export-windows/action.yml | 6 | ||||
| -rw-r--r-- | .github/actions/setup-godot/action.yml | 2 | ||||
| -rw-r--r-- | README.md | 26 |
7 files changed, 44 insertions, 14 deletions
diff --git a/.github/actions/export-android/action.yml b/.github/actions/export-android/action.yml index da3881c..747097e 100644 --- a/.github/actions/export-android/action.yml +++ b/.github/actions/export-android/action.yml @@ -62,6 +62,12 @@ runs: echo "::endgroup::" shell: bash + - 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 + shell: bash + - name: Upload if: steps.get-export-name.outputs.export-name uses: actions/upload-artifact@v3 diff --git a/.github/actions/export-linux/action.yml b/.github/actions/export-linux/action.yml index 6481bb2..430af0a 100644 --- a/.github/actions/export-linux/action.yml +++ b/.github/actions/export-linux/action.yml @@ -22,6 +22,12 @@ runs: echo "::endgroup::" shell: bash + - 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 + shell: bash + - uses: actions/upload-artifact@v3 if: steps.get-export-name.outputs.export-name with: diff --git a/.github/actions/export-mac/action.yml b/.github/actions/export-mac/action.yml index 52e1ab7..e56d58e 100644 --- a/.github/actions/export-mac/action.yml +++ b/.github/actions/export-mac/action.yml @@ -22,6 +22,12 @@ runs: echo "::endgroup::" shell: bash + - 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 + shell: bash + - name: Upload if: steps.get-export-name.outputs.export-name uses: actions/upload-artifact@v3 diff --git a/.github/actions/export-web/action.yml b/.github/actions/export-web/action.yml index 65afd53..7045531 100644 --- a/.github/actions/export-web/action.yml +++ b/.github/actions/export-web/action.yml @@ -32,6 +32,12 @@ runs: echo "::endgroup::" shell: bash + - 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 + shell: bash + - name: Upload if: steps.get-export-name.outputs.export-name uses: actions/upload-artifact@v3 diff --git a/.github/actions/export-windows/action.yml b/.github/actions/export-windows/action.yml index 7c83d7e..d8beb94 100644 --- a/.github/actions/export-windows/action.yml +++ b/.github/actions/export-windows/action.yml @@ -24,6 +24,12 @@ runs: echo "::endgroup::" shell: bash + - 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 + shell: bash + - name: Upload if: steps.get-export-name.outputs.export-name uses: actions/upload-artifact@v3 diff --git a/.github/actions/setup-godot/action.yml b/.github/actions/setup-godot/action.yml index e37d948..e70378c 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 ]]; then + if [[ -f godot.package ]] && chmod +x .github/post_export; 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/ @@ -1,7 +1,7 @@ # godot-actions [](https://github.com/bend-n/godot-actions/blob/main/LICENSE "License") -[](https://godotengine.org) +[](https://godotengine.org) <a href='https://ko-fi.com/bendn' title='Buy me a coffee' target='_blank'><img height='28' src='https://storage.ko-fi.com/cdn/brandasset/kofi_button_red.png' alt='Buy me a coffee'> </a> Github Actions composite action repository. @@ -119,15 +119,15 @@ jobs: </details> -### Users - -[bendn/chess](https://github.com/bend-n/chess) -[bendn/tetris](https://github.com/bend-n/tetris) -[bendn/spaceshooty](https://github.com/bend-n/tetris) -[bendn/remap](https://github.com/bend-n/remap) -[bendn/latex-bot](https://github.com/bend-n/latex-bot) -[bendn/swipe-detector](https://github.com/bend-n/swipe-detector) -[bendn/code-image](https://github.com/bend-n/code-image) -[bendn/gd-eval](https://github.com/bend-n/gd-eval) -[bendn/sokoban](https://github.com/bend-n/sokoban) -[bendn/godot-template](https://github.com/bend-n/godot-template) +### Configuration + +> **Note** If script is not compiled, it must contain a [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>) + +Create a file `./.github/post_export` that will be run after installation. The executable will be run with a argument, containing the platform. (eg: `./.github/post_export linux`) + +Bash example: + +```bash +#!/bin/bash +[[ $1 == "web" ]] && wget -nv "example.org" -O build/web/example.html +``` |