Compare commits
11 Commits
71e37b0b55
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
| 75fb76ef03 | |||
| 36ca9ba5ea | |||
| 172fc7669b | |||
| 0a92f7b461 | |||
| d03874f5e7 | |||
| 987e4300ab | |||
| 991f9f4bec | |||
| 5c35a1beed | |||
| 86274ab1bf | |||
| 248496db91 | |||
| 926a1e8aa0 |
@@ -22,6 +22,7 @@ jobs:
|
|||||||
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
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
run: |
|
run: |
|
||||||
@@ -36,29 +37,31 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -v -p ~/.local/share/godot/export_templates/
|
|
||||||
mkdir -v -p ~/.config/
|
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
echo "Installing Blender ${{ env.BLENDER_VERSION }}..."
|
BLENDER_PATH="/usr/bin/blender"
|
||||||
MAJOR_MINOR="$(echo "${{ env.BLENDER_VERSION }}" | cut -d. -f1,2)"
|
mkdir -pv ~/.config/godot
|
||||||
BLENDER_URL="https://download.blender.org/release/Blender${MAJOR_MINOR}/blender-${{ env.BLENDER_VERSION }}-linux-x64.tar.xz"
|
mkdir -pv ~/.local/share/godot/export_templates/
|
||||||
wget -q "$BLENDER_URL" -O ~/blender.tar.xz
|
|
||||||
tar -xf ~/blender.tar.xz -C ~/
|
|
||||||
BLENDER_DIR="$(find ~ -maxdepth 1 -name "blender-*" -type d | head -n 1)"
|
|
||||||
echo "${BLENDER_DIR}" >> "$GITHUB_PATH"
|
|
||||||
echo "BLENDER_PATH=${BLENDER_DIR}/blender" >> "$GITHUB_ENV"
|
|
||||||
"${BLENDER_DIR}/blender" --version
|
|
||||||
|
|
||||||
GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)"
|
GODOT_CFG="$(find ~/.config/godot -name "editor_settings-*.tres" | head -n 1 || true)"
|
||||||
if [ -n "$GODOT_CFG" ]; then
|
|
||||||
if [ -n "${BLENDER_PATH:-}" ]; then
|
if [ -z "$GODOT_CFG" ]; then
|
||||||
grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG" \
|
echo "# Missing Godot editor settings" > "$GODOT_CFG"
|
||||||
&& sed -i "s|^filesystem/import/blender/blender_path = .*|filesystem/import/blender/blender_path = \"$BLENDER_PATH\"|" "$GODOT_CFG" \
|
exit 1
|
||||||
|| echo "filesystem/import/blender/blender_path = \"$BLENDER_PATH\"" >> "$GODOT_CFG"
|
|
||||||
fi
|
|
||||||
fi
|
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
|
set -Eeuo pipefail
|
||||||
mkdir -v -p build/windows
|
mkdir -v -p build/windows
|
||||||
@@ -71,42 +74,65 @@ jobs:
|
|||||||
name: windows
|
name: windows
|
||||||
path: build/windows
|
path: build/windows
|
||||||
|
|
||||||
# export-linux:
|
export-linux:
|
||||||
# name: Linux Export
|
name: Linux Export
|
||||||
# runs-on: ubuntu-24.04 # Use 24.04 with godot 4
|
runs-on: ubuntu-24.04 # Use 24.04 with godot 4
|
||||||
# container: barichello/godot-ci:4.6
|
container: barichello/godot-ci:4.6
|
||||||
# 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
|
||||||
|
|
||||||
# - name: Install Node.js
|
- name: Install Node.js
|
||||||
# run: |
|
run: |
|
||||||
# curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||||
# apt-get install -y nodejs
|
apt-get install -y nodejs
|
||||||
|
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
# with:
|
with:
|
||||||
# lfs: true
|
lfs: true
|
||||||
# - name: Setup
|
- name: Setup
|
||||||
# run: |
|
shell: bash
|
||||||
# mkdir -v -p ~/.local/share/godot/export_templates/
|
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)"
|
||||||
|
|
||||||
# - name: Linux Build
|
if [ -z "$GODOT_CFG" ]; then
|
||||||
# run: |
|
echo "# Missing Godot editor settings" > "$GODOT_CFG"
|
||||||
# set -Eeuo pipefail
|
exit 1
|
||||||
# mkdir -v -p build/linux
|
fi
|
||||||
# EXPORT_DIR="$(readlink -f build)"
|
|
||||||
# cd $PROJECT_PATH
|
|
||||||
# godot --headless --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
|
|
||||||
|
|
||||||
# - name: Upload Artifact
|
# Set the Blender path
|
||||||
# uses: actions/upload-artifact@v3
|
if [ -n "${BLENDER_PATH:-}" ]; then
|
||||||
# with:
|
if grep -q '^filesystem/import/blender/blender_path' "$GODOT_CFG"; then
|
||||||
# name: linux
|
# Replace existing path
|
||||||
# path: build/linux
|
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
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: linux
|
||||||
|
path: build/linux
|
||||||
|
|
||||||
create-release:
|
create-release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
@@ -116,6 +142,18 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
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: |
|
||||||
@@ -145,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:
|
||||||
@@ -154,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