Skip to content

Instantly share code, notes, and snippets.

@jcorbin
Last active November 7, 2025 13:54
Show Gist options
  • Select an option

  • Save jcorbin/9d11d13f5593304802a7cb9ab779349c to your computer and use it in GitHub Desktop.

Select an option

Save jcorbin/9d11d13f5593304802a7cb9ab779349c to your computer and use it in GitHub Desktop.
# filename: .github/workflows/godot-ci.yml
name: "godot-ci export"
on: push
env: # NOTE when changing $GODOT_VERSION, also probably bump the container image version throughout below
GODOT_VERSION: 4.5
# use a sub-directory if project.godot isn't at repository root
PROJECT_PATH: .
jobs:
export-builds:
strategy:
matrix:
platform: [linux, windows, mac, web]
include:
- platform: linux
export: "Linux"
exe: raccoon.x86_64
- platform: windows
export: "Windows Desktop"
exe: raccoon.exe
- platform: mac
export: "macOS"
exe: raccoon.zip
- platform: web
export: "Web"
exe: index.html
runs-on: ubuntu-24.04
container:
image: barichello/godot-ci:4.5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: 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: ${{ matrix.platform }} Build
id: build
run: |
mkdir -v -p build/${{ matrix.platform }}
git config --global --add safe.directory $(pwd)
export VERSION=$(git describe --always | tee build/version)
EXPORT_DIR="$(readlink -f build)"/${{ matrix.platform }}
cd $PROJECT_PATH
godot --headless --verbose --export-release "${{ matrix.export }}" "$EXPORT_DIR/${{ matrix.exe }}"
echo "version=$(cat build/version)" >> $GITHUB_OUTPUT
- name: Upload ${{ matrix.platform }} Artifact
uses: actions/upload-artifact@v4
with:
name: raccoon-${{ matrix.platform }}-${{ steps.build.outputs.version }}
path: build/${{ matrix.platform }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment