From e0c2c87e7a97223ee3ff361380e469399a652017 Mon Sep 17 00:00:00 2001
From: Vhyrro <vhyrro@gmail.com>
Date: Thu, 23 Nov 2023 20:08:47 +0100
Subject: [PATCH] refactor!: merge all workflows into one monolithic workflow

---
 .github/workflows/build-toml-edit.yml         | 40 -------------------
 .github/workflows/build-toml.yml              | 37 -----------------
 ...luarocks-rust-build-mlua.yml => build.yml} | 14 ++++++-
 3 files changed, 12 insertions(+), 79 deletions(-)
 delete mode 100644 .github/workflows/build-toml-edit.yml
 delete mode 100644 .github/workflows/build-toml.yml
 rename .github/workflows/{build-luarocks-rust-build-mlua.yml => build.yml} (72%)

diff --git a/.github/workflows/build-toml-edit.yml b/.github/workflows/build-toml-edit.yml
deleted file mode 100644
index 017a31fdd..000000000
--- a/.github/workflows/build-toml-edit.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: Build `toml-edit` Dependency
-
-on: [push, workflow_dispatch]
-
-jobs:
-  test:
-    runs-on: ${{ matrix.os.host }}
-    strategy:
-      matrix:
-        os:
-          - host: ubuntu-20.04
-          - host: windows-2019
-          - host: macos-11
-    steps:
-      - uses: actions/checkout@v4
-      - name: Install C/C++ Compiler
-        uses: rlalik/setup-cpp-compiler@master
-        with:
-          compiler: clang-latest
-      - name: Install MSVC Compiler Toolchain
-        uses: ilammy/msvc-dev-cmd@v1
-      - name: Install Lua
-        uses: leso-kn/gh-actions-lua@master
-        with:
-          luaVersion: "5.1"
-      - name: Install Rust Toolchain
-        uses: actions-rust-lang/setup-rust-toolchain@v1
-      - name: Install Luarocks
-        uses: hishamhm/gh-actions-luarocks@master
-      - name: Install `toml-edit` Package
-        run: |
-          luarocks --local --lua-version=5.1 install luarocks-build-rust-mlua
-          luarocks --local --lua-version=5.1 install toml-edit
-          luarocks pack toml-edit
-      - name: Regenerate Manifests and HTML
-        run: luarocks-admin make-manifest --lua-version=5.1 .
-      - uses: stefanzweifel/git-auto-commit-action@v5
-        with:
-          commit_message: "chore: update build artifacts"
-          file_pattern: "*.rock manifest* index.html"
diff --git a/.github/workflows/build-toml.yml b/.github/workflows/build-toml.yml
deleted file mode 100644
index 345970c5e..000000000
--- a/.github/workflows/build-toml.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: Build `toml` Dependency
-
-on: [push, workflow_dispatch]
-
-jobs:
-  test:
-    runs-on: ${{ matrix.os.host }}
-    strategy:
-      matrix:
-        os:
-          - host: ubuntu-20.04
-          - host: windows-2019
-          - host: macos-11
-    steps:
-      - uses: actions/checkout@v4
-      - name: Install C/C++ Compiler
-        uses: rlalik/setup-cpp-compiler@master
-        with:
-          compiler: clang-latest
-      - name: Install MSVC Compiler Toolchain
-        uses: ilammy/msvc-dev-cmd@v1
-      - name: Install Lua
-        uses: leso-kn/gh-actions-lua@master
-        with:
-          luaVersion: "5.1"
-      - name: Install Luarocks
-        uses: hishamhm/gh-actions-luarocks@master
-      - name: Install TOML Package
-        run: |
-          luarocks --local --lua-version=5.1 install toml
-          luarocks pack toml
-      - name: Regenerate Manifests and HTML
-        run: luarocks-admin make-manifest --lua-version=5.1 .
-      - uses: stefanzweifel/git-auto-commit-action@v5
-        with:
-          commit_message: "chore: update build artifacts"
-          file_pattern: "*.rock manifest* index.html"
diff --git a/.github/workflows/build-luarocks-rust-build-mlua.yml b/.github/workflows/build.yml
similarity index 72%
rename from .github/workflows/build-luarocks-rust-build-mlua.yml
rename to .github/workflows/build.yml
index 36e45c8d2..bad07ce2c 100644
--- a/.github/workflows/build-luarocks-rust-build-mlua.yml
+++ b/.github/workflows/build.yml
@@ -1,9 +1,9 @@
-name: Build `luarocks-rust-build-mlua` Dependency
+name: Build Dependencies
 
 on: [push, workflow_dispatch]
 
 jobs:
-  test:
+  build:
     runs-on: ${{ matrix.os.host }}
     strategy:
       matrix:
@@ -19,6 +19,8 @@ jobs:
           compiler: clang-latest
       - name: Install MSVC Compiler Toolchain
         uses: ilammy/msvc-dev-cmd@v1
+      - name: Install Rust Toolchain
+        uses: actions-rust-lang/setup-rust-toolchain@v1
       - name: Install Lua
         uses: leso-kn/gh-actions-lua@master
         with:
@@ -29,6 +31,14 @@ jobs:
         run: |
           luarocks --local --lua-version=5.1 install luarocks-build-rust-mlua
           luarocks pack luarocks-build-rust-mlua
+      - name: Install TOML Package
+        run: |
+          luarocks --local --lua-version=5.1 install toml
+          luarocks pack toml
+          # - name: Install `toml-edit` Package
+          #   run: |
+          #     luarocks --local --lua-version=5.1 install toml-edit
+          #     luarocks pack toml-edit
       - name: Regenerate Manifests and HTML
         run: luarocks-admin make-manifest --lua-version=5.1 .
       - uses: stefanzweifel/git-auto-commit-action@v5