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: ${{ SERVER_URL }} tag_name: ${{ steps.changelog.outputs.version }} name: "Release ${{ steps.changelog.outputs.version }}" body: ${{ steps.changelog.outputs.description }} files: | godot-${{ matrix.preset }}-v${{ steps.changelog.outputs.version }} draft: false token: ${{ secrets.GITEA_TOKEN }}