From b4c4d031c944f9894ec74fb87338cdb5bfc2f761 Mon Sep 17 00:00:00 2001 From: Azur Date: Sat, 20 Sep 2025 08:17:58 +0200 Subject: [PATCH] Create main.yml and add a GitHub action --- .github/workflows/main.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a442dfb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,49 @@ +name: Build Roblox-ts Project + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # 1. Récupération du code + - name: Checkout repo + uses: actions/checkout@v3 + + # 2. Setup Node.js (pour roblox-ts) + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + # 3. Installer les dépendances npm + - name: Install dependencies + run: npm ci + + # 4. Build roblox-ts (compile TS → Luau) + - name: Build project + run: npm run build + + # 5. Installer Rojo (CLI) + - name: Install Rojo + run: | + curl -L https://github.com/rojo-rbx/rojo/releases/download/v7.4.1/rojo-7.4.1-linux.zip -o rojo.zip + unzip rojo.zip -d rojo + sudo mv rojo/rojo /usr/local/bin/rojo + rojo --version + + # 6. Générer un fichier modèle (rbxm / rbxlx) + - name: Build Roblox model + run: rojo build --output plugin.rbxm + + # 7. Sauvegarder l’output comme artifact + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: roblox-build + path: plugin.rbxm