Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: macos-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -19,13 +19,13 @@ jobs:
allow-external-github-orgs: true

- name: Install dependencies
run: lune run install
run: lute scripts/install.luau

- name: Run unit tests
run: lune run test
run: lute scripts/test.luau

code-quality:
runs-on: ubuntu-latest
runs-on: macos-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -36,13 +36,13 @@ jobs:
allow-external-github-orgs: true

- name: Install dependencies
run: lune run install
run: lute scripts/install.luau

- name: Lint
run: lune run lint
run: lute scripts/lint.luau

analyze:
runs-on: ubuntu-latest
runs-on: macos-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -53,12 +53,9 @@ jobs:
allow-external-github-orgs: true

- name: Install dependencies
run: lune run install

- name: Setup Lune typedefs
run: lune setup
run: lute scripts/install.luau

# MUS-2103 TODO: This will error in CI until Foreman is updated to install
# the correct linux binary for luau-lsp
- name: Analyze
run: lune run analyze
run: lute scripts/analyze.luau
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build-standalone-zip:
runs-on: ubuntu-latest
runs-on: macos-latest
timeout-minutes: 10
env:
BUILD_ARTIFACT_PATH: build/rbxasset.zip
Expand All @@ -23,10 +23,10 @@ jobs:
allow-external-github-orgs: true

- name: Install dependencies
run: lune run install
run: lute scripts/install.luau

- name: Build
run: lune run build
run: lute scripts/build.luau

- uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .luaurc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"aliases": {
"root": "src",
"pkg": "pkg",
"lune": "~/.lune/.typedefs/0.9.3"
"lute": "~/.lute/typedefs/0.1.0/lute/",
"std": "~/.lute/typedefs/0.1.0/std/"
}
}
9 changes: 0 additions & 9 deletions .lune/analyze.luau

This file was deleted.

32 changes: 0 additions & 32 deletions .lune/install.luau

This file was deleted.

28 changes: 0 additions & 28 deletions .lune/test.luau

This file was deleted.

5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"luau-lsp.fflags.override": {
"LuauSolverV2": "true"
}
}
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Deploy rbxm files from GitHub to the Creator Store.
# Installation

> [!NOTE]
> [Lune](https://github.com/lune-org/lune) v0.9.3+ is required.
> [Lute](https://github.com/luau-lang/lute) v0.1.0-nightly.20251023+ is required.

## Prebuilt zip (recommended)

Expand All @@ -24,8 +24,8 @@ Run the following commands to clone the repo, install dependencies, and build rb
git clone https://github.com/Roblox/rbxasset.git
cd rbxasset
foreman install
lune run install
lune run build
lute scripts/install.luau
lute scripts/build.luau
```

From there, drag and drop `build/rbxasset` to a place where you will require it via a Luau script.
Expand Down Expand Up @@ -54,25 +54,27 @@ This defines a `default` asset and a `production` environment to deploy to.
Then create a Luau script to handle the deployment:

```luau
-- .lune/publish.luau
local process = require("@lune/process")
-- scripts/publish.luau
local process = require("@lute/process")

local rbxasset = require("./path/to/rbxasset")

local apiKey = process.args[1]
local args = { ... }

local apiKey = args[1]
assert(apiKey, "argument #1 must be a valid Open Cloud API key")

-- The rbxm file needs to be built manually. rbxasset makes no assumptions about
-- how your project is setup, it only cares about having a file to upload. Note
-- the filename `build.rbxm` matches the `model` field in rbxasset.toml
process.exec("rojo", { "build", "-o", "build.rbxm" })
process.run("rojo build -o build.rbxm")

-- Publish the `default` asset defined in rbxasset.toml
rbxasset.publishPackageAsync(process.cwd, "default", apiKey)
rbxasset.publishPackageAsync(process.cwd(), "default", apiKey)
```

```sh
$ lune run publish <API_KEY>
$ lute scripts/publish.luau <API_KEY>
```

Where `<API_KEY>` represents an Open Cloud API key. See below for the exact setup for the key.
Expand Down
12 changes: 7 additions & 5 deletions examples/package/deploy.luau
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
local rbxasset = require("@root/")

local process = require("@lune/process")
local process = require("@lute/process")

local apiKey = process.args[1]
local args = { ... }

local apiKey = args[1]
assert(apiKey, "argument #1 must be a valid Open Cloud API key")

assert(process.cwd:match("examples/package"), "you must be in the `examples/package` folder when running this script")
assert(process.cwd():match("examples/package"), "you must be in the `examples/package` folder when running this script")

process.exec("rojo", { "build", "-o", "asset.rbxm" })
process.run("rojo build -o asset.rbxm")

rbxasset.publishPackageAsync(process.cwd, "package", apiKey)
rbxasset.publishPackageAsync(process.cwd(), "package", apiKey)
12 changes: 7 additions & 5 deletions examples/plugin/deploy.luau
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
local rbxasset = require("@root/")

local process = require("@lune/process")
local process = require("@lute/process")

local apiKey = process.args[1]
local args = { ... }

local apiKey = args[1]
assert(apiKey, "argument #1 must be a valid Open Cloud API key")

assert(process.cwd:match("examples/plugin"), "you must be in the `examples/plugin` folder when running this script")
assert(process.cwd():match("examples/plugin"), "you must be in the `examples/plugin` folder when running this script")

process.exec("rojo", { "build", "-o", "plugin.rbxm" })
process.run("rojo build -o plugin.rbxm")

rbxasset.publishPackageAsync(process.cwd, "plugin", apiKey)
rbxasset.publishPackageAsync(process.cwd(), "plugin", apiKey)
14 changes: 8 additions & 6 deletions examples/workspace/deploy.luau
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
local rbxasset = require("@root/")

local process = require("@lune/process")
local process = require("@lute/process")

local apiKey = process.args[1]
local args = { ... }

local apiKey = args[1]
assert(apiKey, "argument #1 must be a valid Open Cloud API key")

assert(
process.cwd:match("examples/workspace"),
process.cwd():match("examples/workspace"),
"you must be in the `examples/workspace` folder when running this script"
)

process.exec("rojo", { "build", "-o", "../package.rbxm" }, {
process.run("rojo build -o ../package.rbxm", {
cwd = "package",
})

process.exec("rojo", { "build", "-o", "../plugin.rbxm" }, {
process.run("rojo build -o ../plugin.rbxm", {
cwd = "plugin",
})

rbxasset.publishWorkspaceAsync(process.cwd, apiKey)
rbxasset.publishWorkspaceAsync(process.cwd(), apiKey)
2 changes: 1 addition & 1 deletion foreman.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tools]
luau-lsp = { source = "JohnnyMorganz/luau-lsp", version = "=1.53.0" }
lune = { source = "lune-org/lune", version = "=0.9.4" }
lute = { source = "luau-lang/lute", version = "=0.1.0-nightly.20251106" }
rojo = { source = "rojo-rbx/rojo", version = "=7.5.0" }
selene = { source = "kampfkarren/selene", version = "=0.28.0" }
stylua = { source = "johnnymorganz/stylua", version = "=2.1.0" }
15 changes: 15 additions & 0 deletions scripts/analyze.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local run = require("@root/lib/run")

run(
"luau-lsp",
{
"analyze",
"--settings=.vscode/settings.json",
`--ignore="**/pkg/**"`,
"--platform=standard",

"examples",
"scripts",
"src",
} :: { string }
)
4 changes: 2 additions & 2 deletions .lune/build.luau → scripts/build.luau
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local fs = require("@lune/fs")
local fs = require("@lute/fs")

local run = require("@root/lib/run")

Expand All @@ -21,7 +21,7 @@ run("rm", { "-rf", BUILD_PATH })
run("mkdir", { "-p", ARTIFACT_PATH })

for _, includeName in INCLUDES do
if fs.isDir(includeName) then
if fs.type(includeName) == "dir" then
run("cp", { "-R", includeName, `{ARTIFACT_PATH}/{includeName}` })
else
run("cp", { includeName, ARTIFACT_PATH })
Expand Down
54 changes: 54 additions & 0 deletions scripts/install.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
local fs = require("@lute/fs")

local run = require("@root/lib/run")

local PACKAGES_PATH = "pkg"
local PACKAGE_INDEX_NAME = "_Index"

local function installGitDependencies()
local repos = {
{ git = "osyrisrblx/t@1dbfccc1", main = "lib" },
}

for _, repo in repos do
local parts = repo.git:split("@")
local repoPath = parts[1]
local rev = parts[2]

local repoParts = repoPath:split("/")
local projectName = repoParts[2]
local dest = `{PACKAGES_PATH}/{PACKAGE_INDEX_NAME}/{projectName}`

run("git", { "clone", `https://github.com/{repoPath}`, dest })

run("git", { "reset", "--hard", rev }, {
cwd = dest,
})

local linkerPath = `{PACKAGES_PATH}/{projectName}.luau`
fs.writestringtofile(linkerPath, `return require("./{PACKAGE_INDEX_NAME}/{projectName}/{repo.main}")`)
end
end

local function installLuteBatteries()
local commit = "7b4e269"
local batteries = {
"cli.luau",
"toml.luau",
}

run("mkdir", { "-p", PACKAGES_PATH })
for _, battery in batteries do
run("curl", { "-LO", `https://raw.githubusercontent.com/luau-lang/lute/{commit}/batteries/{battery}` }, {
cwd = PACKAGES_PATH,
})
end
end

run("rm", { "-rf", PACKAGES_PATH })

-- Setup typedefs for the current Lute version
run("lute", { "setup" })

installGitDependencies()
installLuteBatteries()
Loading
Loading