Files
6bc64f5c79 fix(ci): gate release publish on required results (#8)
* test(ci): add release publication gate regression

Drive the Publish Release job the way GitHub Actions would. The check
evaluates job `if`/`needs` from `.github/workflows/release.yml` and runs
the job's shell against a stub `gh`. Required platform failures still
publish. The rolling `v0.04-latest` tag is deleted before the empty
artifact check. The release notes have no commit, toolchain, or checksum
metadata.

Co-authored-by: Dallin Bland <SourCreamCulture@users.noreply.github.com>

* fix(ci): gate release publish on required results

Replace if: always() with !cancelled() plus required job results so a
Windows, Linux, macOS, Android, or libretro failure cannot replace a
release. Keep FreeBSD and libretro-android optional. Stop deleting
v0.04-latest. Publish v0.04-<date>-<sha> with commit, toolchain, and
SHA-256 metadata. Call exporter smoke and the Catch2 tests from both
pull-request CI and the release needs list.

Co-authored-by: Dallin Bland <SourCreamCulture@users.noreply.github.com>

* chore(ci): drop leftover always() lecture from the gate check

Delete the module docstring that still taught if: always() after
release.yml stopped using it. GitHub's default success() wrap lives in
apply_github_default_success. Publish is forbidden from deleting a tag
at all, not only from deleting before the empty check.

Co-authored-by: Dallin Bland <SourCreamCulture@users.noreply.github.com>

* test(ci): reject gh prerelease as latest

GitHub returns HTTP 422 Latest release cannot be draft or prerelease
when gh release create passes --prerelease with --latest, then runs
cleanupDraftRelease. The gate stub now fails the same way.

Co-authored-by: Dallin Bland <SourCreamCulture@users.noreply.github.com>

* fix(ci): stop marking prereleases as latest

Remove --latest from publish_release.sh. GitHub forbids a prerelease
from being the latest release and gh then deletes the draft.

Co-authored-by: Dallin Bland <SourCreamCulture@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Dallin Bland <SourCreamCulture@users.noreply.github.com>
2026-09-15 07:39:43 +00:00

30 lines
787 B
Bash
Executable File

#!/bin/bash
# SPDX-FileCopyrightText: Copyright 2026 suyu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
set -euo pipefail
out="${1:-toolchain.txt}"
{
echo "commit=${GITHUB_SHA:-unknown}"
echo "runner_os=${RUNNER_OS:-unknown}"
echo "runner_arch=${RUNNER_ARCH:-unknown}"
echo "job=${GITHUB_JOB:-unknown}"
if command -v cmake >/dev/null 2>&1; then
cmake --version
else
echo "cmake: not found"
fi
if command -v clang++ >/dev/null 2>&1; then
echo "compiler=clang++"
clang++ --version | head -n 2
elif command -v g++ >/dev/null 2>&1; then
echo "compiler=g++"
g++ --version | head -n 2
elif command -v cl >/dev/null 2>&1; then
echo "compiler=msvc"
cl 2>&1 | head -n 3 || true
else
echo "compiler=unknown"
fi
} >"$out"