ape-ame/.github/workflows/build.yml
ultrablob d77daedf56
Some checks failed
CI / build (push) Has been cancelled
fix it
2025-02-06 18:05:31 -05:00

71 lines
2.6 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
GODOT_VERSION: "4.3"
GODOT_BUILD: "stable"
BUILD_TYPE: >
{{ env.GITHUB_EVENT_NAME == "push" && "release" || "debug" }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: docker
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
name: Checkout Files
- name: Download Godot
run: |
echo "https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.arm64.zip"
curl -L -o godot.zip https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.arm64.zip
unzip godot.zip
mv Godot_v$GODOT_VERSION-stable_linux.arm64 /usr/bin/godot
chmod +x /usr/bin/godot
- name: Download Godot Export Templates
run: |
echo "https://code.ultrablob.me/ultrablob/godot-export-template-web-only/releases/download/4.3-stable/godot-4.3-web-only.tpz"
curl -L -o export_templates.zip https://code.ultrablob.me/ultrablob/godot-export-template-web-only/releases/download/4.3-stable/godot-4.3-web-only.tpz
mkdir templates
unzip export_templates.zip -d templates
- name: Install Export Templates
run: |
mkdir -p ~/.local/share/godot/export_templates/$GODOT_VERSION.stable
mv ./templates/* ~/.local/share/godot/export_templates/$GODOT_VERSION.stable
- name: Build Game
run: |
mkdir -v -p build/web
EXPORT_DIR="$(readlink -f build)"
cd $GITHUB_WORKSPACE
/usr/bin/godot --headless --verbose --export-$BUILD_TYPE "Web" "$EXPORT_DIR/web/index.html"
- name: Upload Build
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: Web Build
path: build/web
retention-days: 3
overwrite: true
compression-level: 0