From 256fb36e7435ae38a30fb58da8a509a61804d1d1 Mon Sep 17 00:00:00 2001
From: Jiahao XU <Jiahao_XU@outlook.com>
Date: Thu, 25 May 2023 22:49:06 +1000
Subject: [PATCH] Require job `release-builds` to pass for merging (#1088)

Fixed #1072

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---
 .github/workflows/ci.yml | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9ca7b302..e38454cb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -149,6 +149,9 @@ jobs:
     - run: just avoid-dev-deps
     - run: just lint
 
+  release-builds:
+    uses: ./.github/workflows/release-build.yml
+
   # Dummy job to have a stable name for the "all tests pass" requirement
   tests-pass:
     name: Tests pass
@@ -158,15 +161,11 @@ jobs:
     - apple-m1-check
     - lint
     - windows-aarch64-check
+    - release-builds
     if: always() # always run even if dependencies fail
     runs-on: ubuntu-latest
     steps:
     # fail if ANY dependency has failed or been skipped or cancelled
     - if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')"
       run: exit 1
-    # Wait for 30s before release build to avoid overloading GitHub.
-    - run: sleep 30
-
-  release-builds:
-    needs: tests-pass
-    uses: ./.github/workflows/release-build.yml
+    - run: exit 0