fix: refactor release workflow to streamline export process and update platform configuration
Some checks failed
Build Release / Export (windows) (pull_request) Failing after 2m27s
Some checks failed
Build Release / Export (windows) (pull_request) Failing after 2m27s
This commit is contained in:
@@ -7,65 +7,59 @@ on:
|
|||||||
branches: [release]
|
branches: [release]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
export:
|
||||||
runs-on: ubuntu-latest
|
name: Export (${{ matrix.platform }})
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
container:
|
||||||
|
image: barichello/godot-ci:4.3
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
preset: ["Windows", "Linux/X11", "Web"]
|
include:
|
||||||
|
- platform: windows
|
||||||
|
export_name: "Windows"
|
||||||
|
output: "windows/Experements.exe"
|
||||||
|
|
||||||
|
# - platform: linux
|
||||||
|
# export_name: "Linux/X11"
|
||||||
|
# output: "linux/Experements.x86_64"
|
||||||
|
|
||||||
|
# - platform: web
|
||||||
|
# export_name: "Web"
|
||||||
|
# output: "web/index.html"
|
||||||
|
|
||||||
|
# - platform: mac
|
||||||
|
# export_name: "macOS"
|
||||||
|
# output: "mac/Experements.zip"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
|
||||||
- name: Extract version and body from CHANGELOG
|
- name: Setup
|
||||||
id: changelog
|
|
||||||
run: |
|
run: |
|
||||||
# Extract the latest released version (skip Unreleased)
|
mkdir -v -p ~/.local/share/godot/export_templates/
|
||||||
LATEST=$(grep -E '^## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | head -n1 | sed -E 's/^## \[([0-9]+\.[0-9]+\.[0-9]+)\].*/\1/')
|
mkdir -v -p ~/.config/
|
||||||
|
mv /root/.config/godot ~/.config/godot
|
||||||
if [ -z "$LATEST" ]; then
|
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
|
||||||
echo "No released version found in CHANGELOG.md"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Released version found: $LATEST"
|
|
||||||
echo "version=$LATEST" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# Extract the body: lines until the next ## header
|
|
||||||
BODY=$(awk -v ver="$LATEST" '
|
|
||||||
$0 ~ "^## \\[" ver "\\]" {found=1; next}
|
|
||||||
found && $0 ~ "^## \\[" {exit}
|
|
||||||
found {print}
|
|
||||||
' CHANGELOG.md)
|
|
||||||
|
|
||||||
# Trim leading/trailing empty lines
|
|
||||||
BODY=$(echo "$BODY" | sed '/^\s*$/d')
|
|
||||||
|
|
||||||
# Output body safely for GitHub Actions
|
|
||||||
echo "body<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
echo "$BODY" >> $GITHUB_OUTPUT
|
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# Create Release also creates an Tag
|
|
||||||
# - name: Create git tag
|
|
||||||
# uses: alazhar/gitea-action-autotag@v1
|
|
||||||
# with:
|
|
||||||
# tag: ${{ steps.changelog.outputs.version }}
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: build
|
run: |
|
||||||
uses: mlm-games/godot-build-action@v1.3.1
|
mkdir -v -p build/${{ matrix.platform }}
|
||||||
with:
|
EXPORT_DIR="$(readlink -f build)"
|
||||||
EXPORT_PRESET_NAME: ${{ matrix.preset }}
|
cd $PROJECT_PATH
|
||||||
INSTALL_BLENDER: "true"
|
|
||||||
BLENDER_VERSION: "5.0.0"
|
godot --headless --verbose --export-release \
|
||||||
VERBOSE_IMPORT: "false"
|
"${{ matrix.export_name }}" \
|
||||||
|
"$EXPORT_DIR/${{ matrix.output }}"
|
||||||
|
|
||||||
- name: Upload builds
|
- name: Upload builds
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.preset }}-build
|
name: ${{ matrix.platform }}
|
||||||
path: ${{ steps.build.outputs.build }}
|
path: build/${{ matrix.platform }}
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user