chore:(core) changed folder strukture #6

Merged
haylan merged 3 commits from chore--replacing-folder-structur-to-make-experements-easyer into main 2026-03-21 14:14:47 +01:00
2 changed files with 38 additions and 76 deletions
Showing only changes of commit 1331bc1d4a - Show all commits

View File

@@ -5,6 +5,11 @@ on:
branches: [release] branches: [release]
pull_request: pull_request:
branches: [release] branches: [release]
workflow_dispatch:
inputs:
dummy:
description: "Dry Run — tests the build process without creating a release"
required: false
env: env:
GODOT_VERSION: 4.6.1 GODOT_VERSION: 4.6.1
@@ -13,16 +18,32 @@ env:
BLENDER_VERSION: 5.0.0 BLENDER_VERSION: 5.0.0
jobs: jobs:
export-windows: export:
name: Windows Export name: ${{ matrix.name }} Export
runs-on: ubuntu-24.04 # Use 24.04 with godot 4 runs-on: ubuntu-24.04
container: barichello/godot-ci:4.6 container: barichello/godot-ci:4.6
strategy:
matrix:
include:
- name: Windows
godot_preset: "Windows"
artifact_name: windows
output_ext: ".exe"
install_blender: true
- name: Linux
godot_preset: "Linux/X11"
artifact_name: linux
output_ext: ".x86_64"
install_blender: true
steps: steps:
- name: Update and install dependencies - name: Update and install dependencies
run: | run: |
apt-get update apt-get update
apt-get install -y curl gnupg apt-get install -y curl gnupg
apt-get install -y blender if [ "${{ matrix.install_blender }}" = "true" ]; then
apt-get install -y blender
fi
- name: Install Node.js - name: Install Node.js
run: | run: |
@@ -48,96 +69,36 @@ jobs:
exit 1 exit 1
fi fi
# Set the Blender path
if [ -n "${BLENDER_PATH:-}" ]; then if [ -n "${BLENDER_PATH:-}" ]; then
if grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG"; 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" sed -i "s|^filesystem/import/blender/blender_path = .*|filesystem/import/blender/blender_path = \"$BLENDER_PATH\"|" "$GODOT_CFG"
else else
# Append new path
echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG" echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG"
fi fi
fi fi
echo "Blender path configured in $GODOT_CFG" echo "Blender path configured in $GODOT_CFG"
- name: Windows Build - name: Build
shell: bash shell: bash
run: | run: |
set -Eeuo pipefail set -Eeuo pipefail
mkdir -v -p build/windows mkdir -v -p build/${{ matrix.artifact_name }}
EXPORT_DIR="$(readlink -f build)" EXPORT_DIR="$(readlink -f build)"
cd $PROJECT_PATH cd $PROJECT_PATH
godot --headless --export-release "Windows" "$EXPORT_DIR/windows/$EXPORT_NAME.exe" godot --headless --export-release "${{ matrix.godot_preset }}" \
- name: Upload Artifact "$EXPORT_DIR/${{ matrix.artifact_name }}/$EXPORT_NAME${{ matrix.output_ext }}"
uses: actions/upload-artifact@v3
with:
name: windows
path: build/windows
export-linux:
name: Linux Export
runs-on: ubuntu-24.04 # Use 24.04 with godot 4
container: barichello/godot-ci:4.6
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
uses: actions/checkout@v4
with:
lfs: true
- name: Setup
shell: bash
run: |
set -Eeuo pipefail
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
shell: bash
run: |
set -Eeuo pipefail
mkdir -v -p build/linux
EXPORT_DIR="$(readlink -f build)"
cd $PROJECT_PATH
godot --headless --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: linux name: ${{ matrix.artifact_name }}
path: build/linux path: build/${{ matrix.artifact_name }}
create-release: create-release:
name: Create Release name: Create Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [export-linux, export-windows] needs: [export]
if: github.event_name == 'push'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -157,7 +118,6 @@ jobs:
- name: Extract version and body from CHANGELOG - name: Extract version and body from CHANGELOG
id: changelog id: changelog
run: | run: |
# Extract the latest released version (skip Unreleased)
LATEST=$(grep -E '^## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | head -n1 | sed -E 's/^## \[([0-9]+\.[0-9]+\.[0-9]+)\].*/\1/') LATEST=$(grep -E '^## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | head -n1 | sed -E 's/^## \[([0-9]+\.[0-9]+\.[0-9]+)\].*/\1/')
if [ -z "$LATEST" ]; then if [ -z "$LATEST" ]; then
@@ -168,17 +128,14 @@ jobs:
echo "Released version found: $LATEST" echo "Released version found: $LATEST"
echo "version=$LATEST" >> $GITHUB_OUTPUT echo "version=$LATEST" >> $GITHUB_OUTPUT
# Extract the body: lines until the next ## header
BODY=$(awk -v ver="$LATEST" ' BODY=$(awk -v ver="$LATEST" '
$0 ~ "^## \\[" ver "\\]" {found=1; next} $0 ~ "^## \\[" ver "\\]" {found=1; next}
found && $0 ~ "^## \\[" {exit} found && $0 ~ "^## \\[" {exit}
found {print} found {print}
' CHANGELOG.md) ' CHANGELOG.md)
# Trim leading/trailing empty lines
BODY=$(echo "$BODY" | sed '/^\s*$/d') BODY=$(echo "$BODY" | sed '/^\s*$/d')
# Output body safely for GitHub Actions
echo "body<<EOF" >> $GITHUB_OUTPUT echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$BODY" >> $GITHUB_OUTPUT echo "$BODY" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"conventionalCommits.scopes": [
"ci/cd"
]
}