Skip to content

Godot CI/CD

Godot CI/CD #4

Workflow file for this run

# adapted from https://raw.githubusercontent.com/acemany/hill-climb-driving/refs/heads/main/.github/workflows/build.yml
name: "Godot CI/CD"
env:
GODOT_VERSION: 4.3
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: barichello/godot-ci:4.3
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Move export templates into position
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: Create staging directories
run: |
mkdir -v -p export/linux
mkdir -v -p export/windows
- name: Export Builds
run: |
godot -v --export-release --headless "Linux" --path . --output "export/linux/game.x86_64"
godot -v --export-release --headless "Windows" --path . --output "export/windows/game.exe"
- name: Add Credits and License
run: |
cp CREDITS.md LICENSE export/linux
cp CREDITS.md LICENSE export/windows
- name: Zip Artifacts
run: |
zip -jr game_linux.zip export/linux
zip -jr game_windows.zip export/windows
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: game_linux
path: game_linux.zip
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: game_windows
path: game_windows.zip
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "game_linux.zip,game_windows.zip"