2025-06-14 20:14:36 +02:00
|
|
|
on:
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
inputs:
|
|
|
|
|
deploy-options:
|
|
|
|
|
description: 'Deploy target (none/itch)'
|
|
|
|
|
required: false
|
|
|
|
|
default: 'itch'
|
|
|
|
|
type: choice
|
|
|
|
|
options:
|
|
|
|
|
- itch
|
|
|
|
|
- none
|
|
|
|
|
|
|
|
|
|
name: "Export"
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
GODOT_VERSION: 4.4.1
|
|
|
|
|
EXPORT_NAME: gwj82
|
|
|
|
|
PROJECT_PATH: .
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
delete-artifacts:
|
2025-06-14 20:16:11 +02:00
|
|
|
runs-on: docker
|
2025-06-14 20:14:36 +02:00
|
|
|
steps:
|
|
|
|
|
- uses: kolpav/purge-artifacts-action@v1
|
|
|
|
|
with:
|
|
|
|
|
token: ${{ secrets.PAT }}
|
|
|
|
|
expire-in: 0days # Set this to 0 to delete all artifacts
|
|
|
|
|
|
|
|
|
|
get-version:
|
|
|
|
|
name: Get Version
|
2025-06-14 20:16:11 +02:00
|
|
|
runs-on: docker
|
2025-06-14 20:14:36 +02:00
|
|
|
outputs:
|
|
|
|
|
version: ${{ steps.set_version.outputs.value }}
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
- name: Set Version
|
|
|
|
|
id: set_version
|
|
|
|
|
run: |
|
|
|
|
|
VERSION_STRING=$(grep -oP 'config/version="\K(\d+\.\d+\.\d+)' project.godot)
|
|
|
|
|
echo "value=$VERSION_STRING" >> $GITHUB_OUTPUT
|
|
|
|
|
echo ${VERSION_STRING}
|
|
|
|
|
|
|
|
|
|
export-windows:
|
|
|
|
|
name: Windows Export
|
2025-06-14 20:16:11 +02:00
|
|
|
runs-on: docker
|
2025-06-14 20:14:36 +02:00
|
|
|
needs:
|
|
|
|
|
- get-version
|
|
|
|
|
container:
|
|
|
|
|
image: barichello/godot-ci:4.4.1
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
with:
|
|
|
|
|
lfs: true
|
|
|
|
|
submodules: true
|
|
|
|
|
- name: Setup
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -v -p ~/.local/share/godot/export_templates/
|
|
|
|
|
mkdir -v -p ~/.config/
|
|
|
|
|
mv /root/.config/godot ~/.config/godot
|
|
|
|
|
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
|
|
|
|
- name: Windows Build
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -v -p build/windows
|
|
|
|
|
EXPORT_DIR="$(readlink -f build)"
|
|
|
|
|
cd $PROJECT_PATH
|
|
|
|
|
godot --headless --verbose --export-release "Windows" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
|
|
|
|
|
- name: Upload Artifact
|
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
|
with:
|
|
|
|
|
name: "windows-${{ needs.get-version.outputs.version }}"
|
|
|
|
|
path: build/windows
|
|
|
|
|
|
|
|
|
|
export-mac:
|
|
|
|
|
name: Mac Export
|
2025-06-14 20:16:11 +02:00
|
|
|
runs-on: docker
|
2025-06-14 20:14:36 +02:00
|
|
|
needs:
|
|
|
|
|
- get-version
|
|
|
|
|
container:
|
|
|
|
|
image: barichello/godot-ci:4.4.1
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
with:
|
|
|
|
|
lfs: true
|
|
|
|
|
submodules: true
|
|
|
|
|
- name: Setup
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -v -p ~/.local/share/godot/export_templates/
|
|
|
|
|
mkdir -v -p ~/.config/
|
|
|
|
|
mv /root/.config/godot ~/.config/godot
|
|
|
|
|
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
|
|
|
|
- name: Mac Build
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -v -p build/windows
|
|
|
|
|
EXPORT_DIR="$(readlink -f build)"
|
|
|
|
|
cd $PROJECT_PATH
|
|
|
|
|
godot --headless --verbose --export-release "Mac" "$EXPORT_DIR/mac/$EXPORT_NAME.exe"
|
|
|
|
|
- name: Upload Artifact
|
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
|
with:
|
|
|
|
|
name: "mac-${{ needs.get-version.outputs.version }}"
|
|
|
|
|
path: build/mac
|
|
|
|
|
|
|
|
|
|
export-linux:
|
|
|
|
|
needs:
|
|
|
|
|
- get-version
|
|
|
|
|
name: Linux Export
|
2025-06-14 20:16:11 +02:00
|
|
|
runs-on: docker
|
2025-06-14 20:14:36 +02:00
|
|
|
container:
|
|
|
|
|
image: barichello/godot-ci:4.4.1
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
with:
|
|
|
|
|
lfs: true
|
|
|
|
|
submodules: true
|
|
|
|
|
- name: Setup
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -v -p ~/.local/share/godot/export_templates/
|
|
|
|
|
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
|
|
|
|
- name: Linux Build
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -v -p build/linux
|
|
|
|
|
EXPORT_DIR="$(readlink -f build)"
|
|
|
|
|
cd $PROJECT_PATH
|
|
|
|
|
godot --headless --verbose --export-release "Linux" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
|
|
|
|
|
- name: Upload Artifact
|
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
|
with:
|
|
|
|
|
name: "linux-${{ needs.get-version.outputs.version }}"
|
|
|
|
|
path: build/linux
|
|
|
|
|
|
|
|
|
|
export-web:
|
|
|
|
|
needs:
|
|
|
|
|
- get-version
|
|
|
|
|
name: Web Export
|
2025-06-14 20:16:11 +02:00
|
|
|
runs-on: docker
|
2025-06-14 20:14:36 +02:00
|
|
|
container:
|
|
|
|
|
image: barichello/godot-ci:4.4.1
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
with:
|
|
|
|
|
lfs: true
|
|
|
|
|
submodules: true
|
|
|
|
|
- name: Setup
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -v -p ~/.local/share/godot/export_templates/
|
|
|
|
|
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
|
|
|
|
- name: Web Build
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -v -p build/web
|
|
|
|
|
EXPORT_DIR="$(readlink -f build)"
|
|
|
|
|
cd $PROJECT_PATH
|
|
|
|
|
godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html"
|
|
|
|
|
- name: Upload Artifact
|
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
|
with:
|
|
|
|
|
name: "web-${{ needs.get-version.outputs.version }}"
|
|
|
|
|
path: build/web
|
|
|
|
|
|
|
|
|
|
trigger-deploy:
|
|
|
|
|
env:
|
|
|
|
|
DEPLOY_OPTIONS: ${{ github.event.inputs.deploy-options }} # Default to none
|
2025-06-14 20:16:11 +02:00
|
|
|
runs-on: docker
|
2025-06-14 20:14:36 +02:00
|
|
|
needs:
|
|
|
|
|
- get-version
|
|
|
|
|
- export-web
|
|
|
|
|
- export-windows
|
|
|
|
|
- export-linux
|
|
|
|
|
- export-mac
|
|
|
|
|
if: github.event.inputs.deploy-options == 'itch'
|
|
|
|
|
steps:
|
|
|
|
|
- name: Trigger deployment workflow
|
|
|
|
|
uses: benc-uk/workflow-dispatch@v1
|
|
|
|
|
with:
|
|
|
|
|
workflow: Deployment
|
|
|
|
|
token: ${{ secrets.PAT }}
|
|
|
|
|
inputs: '{"origin_run_id" : "${{ github.run_id }}", "project_version" : "${{ needs.get-version.outputs.version }}"}'
|