Files
OpenMaidEngine/.gitea/workflows/linux-release-build.yml
gamer147 f0f5f12ffc
All checks were successful
Core validation / Linux core gate (push) Successful in 1m12s
Linux release build / Linux x64 artifact (push) Successful in 1m36s
Linux release build / Publish tagged Gitea release (push) Has been skipped
Promote verified tag artifacts to Gitea releases
2026-08-03 19:28:51 -04:00

140 lines
4.5 KiB
YAML

name: Linux release build
on:
push:
branches:
- develop
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: linux-release-${{ gitea.ref }}
cancel-in-progress: true
jobs:
linux-release:
name: Linux x64 artifact
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "true"
NUGET_XMLDOC_MODE: skip
PYTHONUTF8: "1"
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: Restore immutable Linux inputs
uses: actions/cache@v4
with:
path: |
build/downloads/Godot_*_mono_linux_x86_64.zip
build/downloads/ffmpeg-*-linux64-lgpl-shared-*.tar.xz
build/toolchains/godot-*/xdg-data/godot/export_templates/*/linux_release.x86_64
key: linux-release-inputs-${{ hashFiles('tools/godot-linux-x64.json', 'native/age_movie_ffmpeg/dependency-linux-x64.json') }}
- name: Report toolchain
run: |
python --version
dotnet --version
cc --version
readelf --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: Build and smoke-test Linux package
run: ./tools/build-linux-x64.sh
- name: Stage verified workflow artifact
run: |
mkdir -p build/workflow-artifact
cp build/package/OpenMaidEngine-Himegari-linux-x64.tar.gz build/workflow-artifact/
cp build/package/staging/OpenMaidEngine-Himegari-linux-x64/BUILD-INFO.json build/workflow-artifact/
cp build/package/staging/OpenMaidEngine-Himegari-linux-x64/SHA256SUMS build/workflow-artifact/
cp build/package/package-smoke.log build/workflow-artifact/
cd build/workflow-artifact
sha256sum OpenMaidEngine-Himegari-linux-x64.tar.gz > OpenMaidEngine-Himegari-linux-x64.tar.gz.sha256
- name: Upload verified Linux package
uses: christopherhx/gitea-upload-artifact@v4
with:
name: OpenMaidEngine-Himegari-linux-x64-${{ gitea.sha }}
path: build/workflow-artifact/*
if-no-files-found: error
retention-days: 30
- name: Upload failure logs
if: failure()
uses: christopherhx/gitea-upload-artifact@v4
with:
name: linux-release-failure-${{ gitea.run_id }}-${{ gitea.run_attempt }}
path: |
build/package/package-smoke.log
build/validation/**
if-no-files-found: ignore
retention-days: 7
publish-release:
name: Publish tagged Gitea release
if: startsWith(gitea.ref, 'refs/tags/v')
needs: linux-release
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
# Gitea 1.25 granular scope; GitHub-oriented actionlint does not model it.
releases: write
steps:
- name: Check out release tooling
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: Download verified workflow artifact
uses: christopherhx/gitea-download-artifact@v4
with:
name: OpenMaidEngine-Himegari-linux-x64-${{ gitea.sha }}
path: build/release-assets
- name: Create or resume Gitea release
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
python -X utf8 tools/publish_gitea_release.py \
--server "${{ gitea.server_url }}" \
--repository "${{ gitea.repository }}" \
--tag "${{ gitea.ref_name }}" \
--target "${{ gitea.sha }}" \
--asset build/release-assets/OpenMaidEngine-Himegari-linux-x64.tar.gz \
--asset build/release-assets/OpenMaidEngine-Himegari-linux-x64.tar.gz.sha256 \
--asset build/release-assets/BUILD-INFO.json \
--asset build/release-assets/SHA256SUMS \
--asset build/release-assets/package-smoke.log