tools for exporting godot projects via Github Actions
add a option for gh pages deployment
closes #4
bendn 2022-10-18
parent 55aaaeb · commit a76bfdd
-rw-r--r--.github/actions/export-web/action.yml6
-rw-r--r--.github/workflows/callable-export.yml21
-rw-r--r--README.md11
3 files changed, 29 insertions, 9 deletions
diff --git a/.github/actions/export-web/action.yml b/.github/actions/export-web/action.yml
index f679795..053471a 100644
--- a/.github/actions/export-web/action.yml
+++ b/.github/actions/export-web/action.yml
@@ -10,6 +10,10 @@ inputs:
description: Email of commiter
required: true
default: "[email protected]"
+ github-pages:
+ description: To gh pages, or not to gh pages, that is the question.
+ required: true
+ default: "true"
runs:
using: composite
@@ -51,7 +55,7 @@ runs:
shell: bash
- name: Deploy
- if: steps.is-repo.outputs.is-repo == 'true' && steps.get-export-name.outputs.export-name
+ if: steps.is-repo.outputs.is-repo == 'true' && inputs.github-pages == 'true'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
diff --git a/.github/workflows/callable-export.yml b/.github/workflows/callable-export.yml
index 4e72a3b..8da4456 100644
--- a/.github/workflows/callable-export.yml
+++ b/.github/workflows/callable-export.yml
@@ -3,31 +3,44 @@ on:
workflow_call:
inputs:
godot-version:
+ description: the godot version
default: 3.5
required: true
type: number
image:
+ description: the container to use
default: ghcr.io/bend-n/godot-2d:3.5
type: string
required: true
export-name:
+ description: the name of the exec. ($export-name.exe)
default: ${{ github.event.repository.name }}
required: true
type: string
- platforms: # space seperated platform list
+ platforms:
+ description: space seperated platform list
default: "windows linux web android mac"
required: true
type: string
- project-root-path: # the root folder, relative to your repo, or an absolute path.
+ project-root-path:
+ description: the directory that project.godot is in
default: "."
required: false
type: string
+ github-pages:
+ description: to deploy to github pages or not to deploy to github pages
+ default: "true"
+ required: true
+ type: string # shut
secrets:
- android-keystore-base64: # will be filled with andrid debug keystore if left blank
+ android-keystore-base64:
+ description: For signing the apk, will be filled with andrid debug keystore if left blank
required: false
android-keystore-password:
+ description: For signing the apk, will be filled with andrid debug keystore if left blank
required: false
butler-api-key:
+ description: For deploying to itch.io
required: false
env:
@@ -75,6 +88,8 @@ jobs:
steps:
- name: Build
uses: bend-n/godot-actions/.github/actions/export-web@main
+ with:
+ github-pages: ${{ inputs.github-pages }}
android:
runs-on: ubuntu-latest
diff --git a/README.md b/README.md
index e76b4c3..96b055f 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ build-windows:
<summary>Full example</summary>
> **Note**
-> This is a copy of [godot-template/.github/workflows/export.yml](https://github.com/bend-n/godot-template/blob/56b004dc6ad80b93549a15d4368e6fd953b26076/.github/workflows/export.yml)
+> This is a copy of [godot-template/.github/workflows/export.yml](https://github.com/bend-n/godot-template/blob/67c92540c4f8724d1d9994d546d4717c7d807e8f/.github/workflows/export.yml)
```yaml
name: "export" # name of the workflow
@@ -53,15 +53,16 @@ jobs: # the things to do
export: # a thing to do
uses: bend-n/godot-actions/.github/workflows/callable-export.yml@main
with: # variables
- export-name: ${{ github.event.repository.name }} # the name of the zipfile
godot-version: 3.5 # the godot version
image: ghcr.io/bend-n/godot-2d:3.5 # the container to use
+ export-name: ${{ github.event.repository.name }} # the name of the exec. ($export-name.exe)
platforms: "windows linux web android mac" # space seperated list of platforms to build
project-root-path: "." # the directory that project.godot is in
+ github-pages: "true" # to deploy to github pages or not (anything besides 'true' == false)
secrets: # secrets
- android-keystore-base64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} # not required
- android-keystore-password: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} # not required
- butler-api-key: ${{ secrets.BUTLER_CREDENTIALS }} # required for itch.io
+ android-keystore-base64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} # for signing the apk, not required
+ android-keystore-password: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} # ditto
+ butler-api-key: ${{ secrets.BUTLER_CREDENTIALS }} # required for itch.io deployment
```
</details>