Build Windows release artifact in Gitea
All checks were successful
Core validation / Linux core gate (push) Successful in 1m0s
Release builds / Linux x64 artifact (push) Successful in 1m22s
Release builds / Windows x64 artifact (push) Successful in 1m52s
Release builds / Publish tagged Gitea release (push) Has been skipped

This commit is contained in:
gamer147
2026-08-03 22:16:35 -04:00
parent 02e9891baa
commit 9d3ab30bbb
7 changed files with 197 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
name: Linux release build
name: Release builds
on:
push:
@@ -12,7 +12,7 @@ permissions:
contents: read
concurrency:
group: linux-release-${{ gitea.ref }}
group: release-builds-${{ gitea.ref }}
cancel-in-progress: true
jobs:
@@ -95,6 +95,93 @@ jobs:
if-no-files-found: ignore
retention-days: 7
windows-release:
name: Windows x64 artifact
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "true"
NUGET_XMLDOC_MODE: skip
PYTHONUTF8: "1"
MINGW_CC: x86_64-w64-mingw32-gcc-posix
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: "3.11"
architecture: x64
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install MinGW cross-toolchain
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64
- name: Restore immutable Windows inputs
uses: actions/cache@v4
with:
path: |
build/downloads/Godot_*_mono_linux_x86_64.zip
build/downloads/ffmpeg-*-win64-lgpl-shared-*.zip
build/toolchains/godot-*/xdg-data/godot/export_templates/*/windows_release_x86_64.exe
key: windows-release-inputs-${{ hashFiles('tools/godot-linux-x64.json', 'native/age_movie_ffmpeg/dependency-win64.json') }}
- name: Report toolchain
run: |
python --version
dotnet --version
"$MINGW_CC" --version
x86_64-w64-mingw32-objdump --version
free -h
if [ -r /sys/fs/cgroup/memory.max ]; then
echo "cgroup memory.max=$(cat /sys/fs/cgroup/memory.max)"
echo "cgroup memory.current=$(cat /sys/fs/cgroup/memory.current)"
fi
- name: Cross-build and verify Windows package
run: ./tools/build-windows-x64.sh
- name: Stage verified workflow artifact
run: |
mkdir -p build/workflow-artifact-windows
cp build/package/windows-x64/OpenMaidEngine-Himegari-windows-x64.zip build/workflow-artifact-windows/
cp build/package/windows-x64/staging/OpenMaidEngine-Himegari-windows-x64/BUILD-INFO.json build/workflow-artifact-windows/
cp build/package/windows-x64/staging/OpenMaidEngine-Himegari-windows-x64/SHA256SUMS build/workflow-artifact-windows/
cp build/package/windows-x64/staging/OpenMaidEngine-Himegari-windows-x64/WINDOWS-VERIFICATION.json build/workflow-artifact-windows/
cd build/workflow-artifact-windows
sha256sum OpenMaidEngine-Himegari-windows-x64.zip > OpenMaidEngine-Himegari-windows-x64.zip.sha256
- name: Upload verified Windows package
uses: christopherhx/gitea-upload-artifact@v4
with:
name: OpenMaidEngine-Himegari-windows-x64-${{ gitea.sha }}
path: build/workflow-artifact-windows/*
if-no-files-found: error
retention-days: 30
- name: Upload failure evidence
if: failure()
uses: christopherhx/gitea-upload-artifact@v4
with:
name: windows-release-failure-${{ gitea.run_id }}-${{ gitea.run_attempt }}
path: |
build/native/win-x64/verification.json
build/package/windows-x64/staging/OpenMaidEngine-Himegari-windows-x64/WINDOWS-VERIFICATION.json
build/validation/**
if-no-files-found: ignore
retention-days: 7
publish-release:
name: Publish tagged Gitea release
if: startsWith(gitea.ref, 'refs/tags/v')