Skip to content

Commit

Permalink
lint and upload roblox plugin to release & ci/cd changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Barocena committed Dec 20, 2023
1 parent bcd7fa3 commit f422fa2
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 9 deletions.
65 changes: 59 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,82 @@ jobs:
release_name: ${{ github.ref }}
draft: true

release:
build plugin:
runs-on: ubuntu-latest
needs: ["create-release"]
name: Build Roblox Studio Plugin
steps:
- uses: actions/checkout@v3
- uses: ok-nick/[email protected]

- name: Run selene
run: selene src
working-directory: plugin

- name: Run stylua
run: stylua -c src
working-directory: plugin

- name: Generate sourcemap
run: rojo sourcemap default.project.json --output sourcemap.json
working-directory: plugin

- name: Download global Roblox types
shell: bash
run: curl -s -O https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/master/scripts/globalTypes.d.lua

- name: Run Luau Analyze
run: luau-lsp analyze --sourcemap=sourcemap.json --defs=../globalTypes.d.lua --no-strict-dm-types src
working-directory: plugin

- name: Build Plugin
run: rojo build plugin -o Plugin.rbxm

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Plugin.rbxm
path: Plugin.rbxm

- name: Upload Plugin to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: Plugin.rbxm
asset_name: Plugin.rbxm
asset_content_type: application/octet-stream

build exe:
runs-on: ubuntu-latest
needs: ["create-release"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install
- name: Build
-

- name: Build with Nexe
run: node build.js

- name: Upload Binary Artifact
uses: actions/upload-artifact@v3
with:
name: StyLua-Plugin
path: out/StyLua-Plugin.exe
name: StyLua-Roblox.exe
path: StyLua-Roblox.exe

- name: Upload release assets to GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: out/StyLua-Plugin.exe
asset_name: StyLua-Plugin.exe
asset_path: StyLua-Roblox.exe
asset_name: StyLua-Roblox.exe
asset_content_type: application/octet-stream
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node

# Plugin model files
/Plugin.rbxmx
/Plugin.rbxm
*.d.lua
*.exe

# Todo list
/TODO.md
Expand Down
5 changes: 5 additions & 0 deletions aftman.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[tools]
rojo = "rojo-rbx/[email protected]"
luau-lsp = "JohnnyMorganz/[email protected]"
stylua = "JohnnyMorganz/[email protected]"
selene = "Kampfkarren/[email protected]"

0 comments on commit f422fa2

Please sign in to comment.