Require both platform artifacts for releases
All checks were successful
Release builds / Linux x64 artifact (push) Successful in 2m17s
Release builds / Windows x64 artifact (push) Successful in 1m19s
Release builds / Publish tagged Gitea release (push) Has been skipped
Core validation / Linux core gate (push) Successful in 1m17s

This commit is contained in:
gamer147
2026-08-03 22:35:43 -04:00
parent 4799b48b9c
commit d657c63e57
7 changed files with 473 additions and 129 deletions

View File

@@ -59,11 +59,21 @@ class ReleaseWorkflowTests(unittest.TestCase):
self.assertIn("if-no-files-found: error", self.windows)
self.assertIn("retention-days: 30", self.windows)
def test_slice_three_keeps_linux_only_tag_promotion_boundary(self) -> None:
def test_tag_promotion_requires_and_downloads_both_platform_artifacts(self) -> None:
self.assertIn("if: startsWith(gitea.ref, 'refs/tags/v')", self.publish)
self.assertRegex(self.publish, r"(?m)^ needs: linux-release$")
self.assertRegex(
self.publish,
r"(?m)^ needs:\n - linux-release\n - windows-release$",
)
self.assertIn("releases: write", self.publish)
self.assertNotIn("windows-release", self.publish)
self.assertIn("OpenMaidEngine-Himegari-linux-x64-${{ gitea.sha }}", self.publish)
self.assertIn("OpenMaidEngine-Himegari-windows-x64-${{ gitea.sha }}", self.publish)
self.assertIn("path: build/release-assets/linux", self.publish)
self.assertIn("path: build/release-assets/windows", self.publish)
self.assertIn("--linux-artifact-directory build/release-assets/linux", self.publish)
self.assertIn("--windows-artifact-directory build/release-assets/windows", self.publish)
self.assertIn("--output-directory build/release-assets/prepared", self.publish)
self.assertNotIn("--asset", self.publish)
if __name__ == "__main__":