Create main.yml and add a GitHub action
This commit is contained in:
49
.github/workflows/main.yml
vendored
Normal file
49
.github/workflows/main.yml
vendored
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user