Compare commits
13 Commits
f16838c81c
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
| 75fb76ef03 | |||
| 36ca9ba5ea | |||
| 172fc7669b | |||
| 0a92f7b461 | |||
| d03874f5e7 | |||
| 987e4300ab | |||
| 991f9f4bec | |||
| 5c35a1beed | |||
| 86274ab1bf | |||
| 248496db91 | |||
| 926a1e8aa0 | |||
| 71e37b0b55 | |||
| 81dca211b5 |
@@ -10,6 +10,7 @@ env:
|
||||
GODOT_VERSION: 4.6.1
|
||||
EXPORT_NAME: Experements
|
||||
PROJECT_PATH: .
|
||||
BLENDER_VERSION: 5.0.0
|
||||
|
||||
jobs:
|
||||
export-windows:
|
||||
@@ -21,6 +22,7 @@ jobs:
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y curl gnupg
|
||||
apt-get install -y blender
|
||||
|
||||
- name: Install Node.js
|
||||
run: |
|
||||
@@ -33,16 +35,39 @@ jobs:
|
||||
lfs: true
|
||||
|
||||
- name: Setup
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -v -p ~/.local/share/godot/export_templates/
|
||||
mkdir -v -p ~/.config/
|
||||
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: Windows Build
|
||||
shell: bash
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
mkdir -v -p build/windows
|
||||
EXPORT_DIR="$(readlink -f build)"
|
||||
cd $PROJECT_PATH
|
||||
godot --headless --verbose --export-release "Windows" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
|
||||
godot --headless --export-release "Windows" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -69,15 +94,39 @@ jobs:
|
||||
with:
|
||||
lfs: true
|
||||
- name: Setup
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -v -p ~/.local/share/godot/export_templates/
|
||||
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 --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
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -88,8 +137,23 @@ jobs:
|
||||
create-release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [export-mac, export-linux, export-windows]
|
||||
needs: [export-linux, export-windows]
|
||||
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
|
||||
id: changelog
|
||||
run: |
|
||||
@@ -119,6 +183,11 @@ jobs:
|
||||
echo "$BODY" >> $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
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
@@ -128,3 +197,6 @@ jobs:
|
||||
body: ${{ steps.changelog.outputs.body }}
|
||||
draft: false
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
files: |
|
||||
windows-${{ steps.changelog.outputs.version }}.zip
|
||||
linux-${{ steps.changelog.outputs.version }}.zip
|
||||
|
||||
Reference in New Issue
Block a user