Compare commits
24 Commits
ebe34e1750
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
| 75fb76ef03 | |||
| 36ca9ba5ea | |||
| 172fc7669b | |||
| 0a92f7b461 | |||
| d03874f5e7 | |||
| 987e4300ab | |||
| 991f9f4bec | |||
| 5c35a1beed | |||
| 86274ab1bf | |||
| 248496db91 | |||
| 926a1e8aa0 | |||
| 71e37b0b55 | |||
| 81dca211b5 | |||
| f16838c81c | |||
| 0d14d27a0b | |||
| 3c619c9613 | |||
| fd52dc9c1c | |||
| 40d8d8753d | |||
| 051c822bd5 | |||
| 3ab31fe40b | |||
| 376c1b5225 | |||
| 03787a82fc | |||
| bc9f0b9f27 | |||
| 1aa0dbf544 |
@@ -7,127 +7,153 @@ on:
|
|||||||
branches: [release]
|
branches: [release]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GODOT_VERSION: 4.3
|
GODOT_VERSION: 4.6.1
|
||||||
EXPORT_NAME: test-project
|
EXPORT_NAME: Experements
|
||||||
PROJECT_PATH: test-project
|
PROJECT_PATH: .
|
||||||
|
BLENDER_VERSION: 5.0.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
export-windows:
|
export-windows:
|
||||||
name: Windows Export
|
name: Windows Export
|
||||||
runs-on: ghcr.io/catthehacker/ubuntu:full-24.04 # Use 24.04 with godot 4
|
runs-on: ubuntu-24.04 # Use 24.04 with godot 4
|
||||||
container: barichello/godot-ci:4.3
|
container: barichello/godot-ci:4.6
|
||||||
steps:
|
steps:
|
||||||
|
- name: Update and install dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y curl gnupg
|
||||||
|
apt-get install -y blender
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -v -p ~/.local/share/godot/export_templates/
|
set -Eeuo pipefail
|
||||||
mkdir -v -p ~/.config/
|
BLENDER_PATH="/usr/bin/blender"
|
||||||
mv /root/.config/godot ~/.config/godot
|
mkdir -pv ~/.config/godot
|
||||||
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
mkdir -pv ~/.local/share/godot/export_templates/
|
||||||
|
GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)"
|
||||||
|
|
||||||
|
if [ -z "$GODOT_CFG" ]; then
|
||||||
|
echo "# Missing Godot editor settings" > "$GODOT_CFG"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the Blender path
|
||||||
|
if [ -n "${BLENDER_PATH:-}" ]; then
|
||||||
|
if grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG"; then
|
||||||
|
# Replace existing path
|
||||||
|
sed -i "s|^filesystem/import/blender/blender_path = .*|filesystem/import/blender/blender_path = \"$BLENDER_PATH\"|" "$GODOT_CFG"
|
||||||
|
else
|
||||||
|
# Append new path
|
||||||
|
echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Blender path configured in $GODOT_CFG"
|
||||||
|
|
||||||
- name: Windows Build
|
- name: Windows Build
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -Eeuo pipefail
|
||||||
mkdir -v -p build/windows
|
mkdir -v -p build/windows
|
||||||
EXPORT_DIR="$(readlink -f build)"
|
EXPORT_DIR="$(readlink -f build)"
|
||||||
cd $PROJECT_PATH
|
cd $PROJECT_PATH
|
||||||
godot --headless --verbose --export-release "Windows Desktop" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
|
godot --headless --export-release "Windows" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: windows
|
name: windows
|
||||||
path: build/windows
|
path: build/windows
|
||||||
|
|
||||||
export-linux:
|
export-linux:
|
||||||
name: Linux Export
|
name: Linux Export
|
||||||
runs-on: ghcr.io/catthehacker/ubuntu:full-24.04 # Use 24.04 with godot 4
|
runs-on: ubuntu-24.04 # Use 24.04 with godot 4
|
||||||
container: barichello/godot-ci:4.3
|
container: barichello/godot-ci:4.6
|
||||||
steps:
|
steps:
|
||||||
|
- name: Update and install dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y curl gnupg
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
- name: Setup
|
- name: Setup
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -v -p ~/.local/share/godot/export_templates/
|
set -Eeuo pipefail
|
||||||
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
BLENDER_PATH="/usr/bin/blender"
|
||||||
|
mkdir -pv ~/.config/godot
|
||||||
|
mkdir -pv ~/.local/share/godot/export_templates/
|
||||||
|
GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)"
|
||||||
|
|
||||||
|
if [ -z "$GODOT_CFG" ]; then
|
||||||
|
echo "# Missing Godot editor settings" > "$GODOT_CFG"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the Blender path
|
||||||
|
if [ -n "${BLENDER_PATH:-}" ]; then
|
||||||
|
if grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG"; then
|
||||||
|
# Replace existing path
|
||||||
|
sed -i "s|^filesystem/import/blender/blender_path = .*|filesystem/import/blender/blender_path = \"$BLENDER_PATH\"|" "$GODOT_CFG"
|
||||||
|
else
|
||||||
|
# Append new path
|
||||||
|
echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Blender path configured in $GODOT_CFG"
|
||||||
|
|
||||||
- name: Linux Build
|
- name: Linux Build
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -Eeuo pipefail
|
||||||
mkdir -v -p build/linux
|
mkdir -v -p build/linux
|
||||||
EXPORT_DIR="$(readlink -f build)"
|
EXPORT_DIR="$(readlink -f build)"
|
||||||
cd $PROJECT_PATH
|
cd $PROJECT_PATH
|
||||||
godot --headless --verbose --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
|
godot --headless --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: linux
|
name: linux
|
||||||
path: build/linux
|
path: build/linux
|
||||||
|
|
||||||
# export-web:
|
|
||||||
# name: Web Export
|
|
||||||
# runs-on: ghcr.io/catthehacker/ubuntu:full-24.04 # Use 24.04 with godot 4
|
|
||||||
# container:
|
|
||||||
# image: barichello/godot-ci:4.3
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout
|
|
||||||
# uses: actions/checkout@v6
|
|
||||||
# with:
|
|
||||||
# lfs: 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@v5
|
|
||||||
# with:
|
|
||||||
# name: web
|
|
||||||
# path: build/web
|
|
||||||
# - name: Install rsync 📚
|
|
||||||
# run: |
|
|
||||||
# apt-get update && apt-get install -y rsync
|
|
||||||
# - name: Deploy to GitHub Pages 🚀
|
|
||||||
# uses: JamesIves/github-pages-deploy-action@releases/v4
|
|
||||||
# with:
|
|
||||||
# branch: gh-pages # The branch the action should deploy to.
|
|
||||||
# folder: build/web # The folder the action should deploy.
|
|
||||||
|
|
||||||
export-mac:
|
|
||||||
name: Mac Export
|
|
||||||
runs-on: ghcr.io/catthehacker/ubuntu:full-24.04 # Use 24.04 with godot 4
|
|
||||||
container: barichello/godot-ci:4.3
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
lfs: 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: Mac Build
|
|
||||||
run: |
|
|
||||||
mkdir -v -p build/mac
|
|
||||||
EXPORT_DIR="$(readlink -f build)"
|
|
||||||
cd $PROJECT_PATH
|
|
||||||
godot --headless --verbose --export-release "macOS" "$EXPORT_DIR/mac/$EXPORT_NAME.zip"
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v5
|
|
||||||
with:
|
|
||||||
name: mac
|
|
||||||
path: build/mac
|
|
||||||
|
|
||||||
create-release:
|
create-release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [export-mac, export-linux, export-windows]
|
needs: [export-linux, export-windows]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download Windows Artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: windows
|
||||||
|
path: build/windows
|
||||||
|
|
||||||
|
- name: Download Linux Artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: linux
|
||||||
|
path: build/linux
|
||||||
|
|
||||||
- name: Extract version and body from CHANGELOG
|
- name: Extract version and body from CHANGELOG
|
||||||
id: changelog
|
id: changelog
|
||||||
run: |
|
run: |
|
||||||
@@ -157,6 +183,11 @@ jobs:
|
|||||||
echo "$BODY" >> $GITHUB_OUTPUT
|
echo "$BODY" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Zipping exports
|
||||||
|
run: |
|
||||||
|
zip -r windows-${{ steps.changelog.outputs.version }}.zip build/windows
|
||||||
|
zip -r linux-${{ steps.changelog.outputs.version }}.zip build/linux
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -166,3 +197,6 @@ jobs:
|
|||||||
body: ${{ steps.changelog.outputs.body }}
|
body: ${{ steps.changelog.outputs.body }}
|
||||||
draft: false
|
draft: false
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
files: |
|
||||||
|
windows-${{ steps.changelog.outputs.version }}.zip
|
||||||
|
linux-${{ steps.changelog.outputs.version }}.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user