Files
Godot-Experements/.gitea/workflows/release.yml
Haylan 3aa520203e
Some checks failed
Build Release / build (Web) (pull_request) Failing after 2m30s
Build Release / build (Windows) (pull_request) Failing after 2m42s
Build Release / build (Linux/X11) (pull_request) Failing after 2m51s
fix: update release action to include formatted release name and description
2026-03-16 22:15:03 +01:00

68 lines
2.1 KiB
YAML

name: Build Release
on:
push:
branches: [release]
pull_request:
branches: [release]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
preset: ["Windows", "Linux/X11", "Web"]
steps:
- uses: actions/checkout@v6
- name: Extract version from CHANGELOG
id: changelog
run: |
LATEST=$(grep -E '^## \[(.*)\]' CHANGELOG.md | grep -v '\[Unreleased\]' | head -n1 | sed -E 's/^## \[([^\]]+)\].*/\1/')
if [ -z "$LATEST" ]; then
echo "No released version found in CHANGELOG.md"
exit 1
else
echo "Released version found: $LATEST"
echo "version=$LATEST" >> $GITHUB_OUTPUT
fi
# Create Release also creates an Tag
# - name: Create git tag
# uses: alazhar/gitea-action-autotag@v1
# with:
# tag: ${{ steps.changelog.outputs.version }}
- name: Build
id: build
uses: mlm-games/godot-build-action@v1.3.1
with:
EXPORT_PRESET_NAME: ${{ matrix.preset }}
INSTALL_BLENDER: "true"
BLENDER_VERSION: "5.0.0"
VERBOSE_IMPORT: "false"
- name: Normalize build path
id: normalize
run: echo "path=$(realpath ${{ steps.build.outputs.build }})" >> $GITHUB_OUTPUT
- name: Upload builds
uses: actions/upload-artifact@v5
with:
name: godot-${{ matrix.preset }}-v${{ steps.changelog.outputs.version }}
path: ${{ steps.normalize.outputs.path }}
- name: Create Release
uses: akkuman/gitea-release-action@v1
with:
server_url: ${{ vars.SERVER_URL }}
tag_name: ${{ steps.changelog.outputs.version | replace('## ', '') | replace('[','') | replace(']','') | replace(' ', '-') }}
name: "Release ${{ steps.changelog.outputs.version | replace('## ', '') | replace('[','') | replace(']','') }}"
body: ${{ steps.changelog.outputs.description }}
files: |
godot-${{ matrix.preset }}-v${{ steps.changelog.outputs.version }}
draft: false
token: ${{ secrets.GITEA_TOKEN }}