Skip to content

Commit f11d4a0

Browse files
authored
Build process (#15)
1 parent 504e190 commit f11d4a0

File tree

5 files changed

+72
-2
lines changed

5 files changed

+72
-2
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,41 @@ on:
99
- main
1010

1111
jobs:
12-
publish-package:
12+
build-standalone-zip:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
env:
16+
BUILD_ARTIFACT_PATH: build/rbxasset.zip
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: Roblox/setup-foreman@v3
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
allow-external-github-orgs: true
24+
25+
- uses: lumin-org/[email protected]
26+
27+
- name: Install dependencies
28+
run: pesde install
29+
30+
- name: Build
31+
run: lune run build
32+
33+
- uses: actions/upload-artifact@v4
34+
with:
35+
path: ${{ env.BUILD_ARTIFACT_PATH }}
36+
name: rbxasset
37+
38+
# - uses: Roblox-ActionsCache/softprops-action-gh-release@v1
39+
- uses: softprops/action-gh-release@v1
40+
if: startsWith(github.ref, 'refs/tags/v')
41+
with:
42+
files: ${{ env.BUILD_ARTIFACT_PATH }}
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
46+
publish-to-pesde-registry:
1347
runs-on: ubuntu-latest
1448
timeout-minutes: 10
1549
steps:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Build artifacts
2+
build
13
temp
24

35
# Pesde

.lune/build.luau

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
local fs = require("@lune/fs")
2+
3+
local run = require("@root/lib/run")
4+
5+
local INCLUDES = {
6+
".luaurc",
7+
"init.luau",
8+
"LICENSE",
9+
"README.md",
10+
11+
"src/",
12+
"lune_packages/",
13+
}
14+
15+
local BUILD_PATH = "build"
16+
local ARTIFACT_NAME = "rbxasset"
17+
local ARCHIVE_NAME = "rbxasset.zip"
18+
local ARTIFACT_PATH = `{BUILD_PATH}/{ARTIFACT_NAME}/`
19+
20+
run("rm", { "-rf", BUILD_PATH })
21+
run("mkdir", { "-p", ARTIFACT_PATH })
22+
23+
for _, includeName in INCLUDES do
24+
if fs.isDir(includeName) then
25+
run("cp", { "-R", includeName, `{ARTIFACT_PATH}/{includeName}` })
26+
else
27+
run("cp", { includeName, ARTIFACT_PATH })
28+
end
29+
end
30+
31+
run("zip", { "-r", ARCHIVE_NAME, ARTIFACT_NAME }, {
32+
cwd = BUILD_PATH,
33+
})

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $ git clone https://github.com/ghostnaps/rbxasset.git
1111
Then define a Luau script to use it:
1212

1313
```luau
14-
local rbxasset = require("./path/to/rbxasset/src")
14+
local rbxasset = require("./path/to/rbxasset")
1515
```
1616

1717
# Usage

init.luau

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
return require("@self/src")

0 commit comments

Comments
 (0)