From 9bdbb3672abf3fb9cc76a6d64b93c06c66941c48 Mon Sep 17 00:00:00 2001
From: tommy <thefamousdoge@hotmail.com>
Date: Tue, 3 Jun 2025 01:29:13 -0400
Subject: [PATCH] surely this works first try right guys?

---
 .gitea/workflows/rust.yml | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/.gitea/workflows/rust.yml b/.gitea/workflows/rust.yml
index 1ec8d16..a4bee1c 100644
--- a/.gitea/workflows/rust.yml
+++ b/.gitea/workflows/rust.yml
@@ -8,25 +8,40 @@ jobs:
   build:
     runs-on: ubuntu-latest
 
+    strategy:
+      matrix:
+        target:
+          - x86_64-pc-windows-gnu
+          - x86_64-unknown-linux-gnu
+        include:
+          - target: x86_64-pc-windows-gnu
+            os: windows
+            extension: .exe
+          - target: x86_64-unknown-linux-gnu
+            os: linux
+            extension: ""
     steps:
       - uses: actions/checkout@v3
 
       - name: Install rust
         uses: dtolnay/rust-toolchain@stable
         with:
-          targets: "x86_64-pc-windows-gnu"
+          targets: ${{ matrix.target }}
 
       - name: Install cross compilation tools
+        if: matrix.target == 'x86_64-pc-windows-gnu'
         run: sudo apt-get update && sudo apt-get install mingw-w64 -y
 
       - name: Setup Cache
         uses: Swatinem/rust-cache@v2
+        with:
+          key: ${{ matrix.target }}
 
       - name: Build release
-        run: cargo build --verbose --locked --release --target x86_64-pc-windows-gnu
+        run: cargo build --verbose --locked --release --target ${{ matrix.target }}
 
       - name: Archive build
         uses: actions/upload-artifact@v3
         with:
-          name: alt_enter_fix
-          path: target/x86_64-pc-windows-gnu/release/alt_enter_fix.exe
+          name: alt_enter_fix-${{ matrix.os }}
+          path: target/${{ matrix.target }}/release/alt_enter_fix${{ matrix.extension }}
\ No newline at end of file