From abe744b4903436e514950e46bd69d5ed287018c7 Mon Sep 17 00:00:00 2001
From: Eduard Lupacescu <eduard.lupacescu@binarcode.com>
Date: Fri, 17 Feb 2023 13:30:43 +0200
Subject: [PATCH 1/2] fix: eager loading logs when running the schedule:run
 command

---
 src/Actions/RunSchedulersAction.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Actions/RunSchedulersAction.php b/src/Actions/RunSchedulersAction.php
index 120ea4354e3b..94e6dd1d3bf0 100644
--- a/src/Actions/RunSchedulersAction.php
+++ b/src/Actions/RunSchedulersAction.php
@@ -13,6 +13,7 @@ public function __invoke()
     {
         static::scheduler()::query()
             ->ready()
+            ->with('logs')
             ->cursor()
             ->filter(fn (MailatorSchedule $schedule) => $schedule->shouldSend())
             ->each(fn (MailatorSchedule $schedule) => $schedule->execute());

From b9822454554c9245fbfa7e4238d79ffb233f4c6f Mon Sep 17 00:00:00 2001
From: Eduard Lupacescu <eduard.lupacescu@binarcode.com>
Date: Fri, 17 Feb 2023 13:33:05 +0200
Subject: [PATCH 2/2] fix: wip

---
 .github/workflows/release.yml | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 .github/workflows/release.yml

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 000000000000..99068bec3900
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,22 @@
+name: Release
+
+on:
+    pull_request:
+        types:
+            - closed
+        branches:
+            - "main"
+
+jobs:
+    release:
+        name: Create release
+        if: github.event.pull_request.merged == true
+        runs-on: "ubuntu-latest"
+        steps:
+            - uses: actions/checkout@v2
+            - uses: ncipollo/release-action@v1
+              with:
+                  name: ${{ github.event.pull_request.title }}
+                  tag: ${{ github.event.pull_request.title }}
+                  body: ${{ github.event.pull_request.body }}
+                  prerelease: false