Skip to content

Commit 2f138e5

Browse files
authored
Pin Roblox packages (#333)
# Problem It was brought up here #329 (comment) that there are actually endpoints that can download historic copies of Roblox's packages, which means it's possible to pin a specific version to install. # Solution I updated `roblox-packages` to make it possible to install a specific version of Roblox's packages. Then in Flipbook I've updated rokit.toml to use the new version, and setup pinning. We'll now consistently be pulling in packages from `0.690.0.6900721`
1 parent c83e423 commit 2f138e5

File tree

5 files changed

+15
-66
lines changed

5 files changed

+15
-66
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@ on:
77
pull_request:
88

99
jobs:
10-
install-packages:
11-
uses: ./.github/workflows/install-packages.yml
12-
with:
13-
artifact-name: packages
14-
1510
build:
16-
needs: ["install-packages"]
1711
runs-on: ubuntu-latest
1812
timeout-minutes: 5
1913
steps:
@@ -23,9 +17,8 @@ jobs:
2317
with:
2418
version: v1.1.1
2519

26-
- uses: actions/download-artifact@v4
27-
with:
28-
name: packages
20+
- name: Install dependencies
21+
run: lune run install
2922

3023
- name: Lint
3124
run: lune run lint
@@ -45,7 +38,6 @@ jobs:
4538
path: ${{ env.MODEL_FILE }}
4639

4740
analyze:
48-
needs: ["install-packages"]
4941
runs-on: ubuntu-latest
5042
timeout-minutes: 5
5143
steps:
@@ -55,9 +47,8 @@ jobs:
5547
with:
5648
version: v1.1.1
5749

58-
- uses: actions/download-artifact@v4
59-
with:
60-
name: packages
50+
- name: Install dependencies
51+
run: lune run install
6152

6253
- name: Setup Lune typedefs
6354
run: lune setup
@@ -66,7 +57,6 @@ jobs:
6657
run: lune run analyze
6758

6859
tests:
69-
needs: ["install-packages"]
7060
runs-on: ubuntu-latest
7161
timeout-minutes: 10
7262
steps:
@@ -76,9 +66,8 @@ jobs:
7666
with:
7767
version: v1.1.1
7868

79-
- uses: actions/download-artifact@v4
80-
with:
81-
name: packages
69+
- name: Install dependencies
70+
run: lune run install
8271

8372
- name: Create .env
8473
run: cp .env.template .env

.github/workflows/install-packages.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@ on:
99
- main
1010

1111
jobs:
12-
install-packages:
13-
uses: ./.github/workflows/install-packages.yml
14-
with:
15-
artifact-name: packages
16-
1712
publish-github-release:
18-
needs: ["install-packages"]
1913
runs-on: ubuntu-latest
2014
permissions:
2115
contents: write
@@ -31,9 +25,8 @@ jobs:
3125
name=$(jq -r .name default.project.json)
3226
echo "MODEL_FILE=$name.rbxm" >> $GITHUB_ENV
3327
34-
- uses: actions/download-artifact@v4
35-
with:
36-
name: packages
28+
- name: Install dependencies
29+
run: lune run install
3730

3831
- name: Build
3932
run: lune run build --target prod --output ${{ env.MODEL_FILE }}
@@ -46,7 +39,6 @@ jobs:
4639
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4740

4841
publish-plugin:
49-
needs: ["install-packages"]
5042
runs-on: ubuntu-latest
5143
timeout-minutes: 10
5244
env:
@@ -58,9 +50,8 @@ jobs:
5850
with:
5951
version: v1.1.1
6052

61-
- uses: actions/download-artifact@v4
62-
with:
63-
name: packages
53+
- name: Install dependencies
54+
run: lune run install
6455

6556
- name: Publish nightly build to Creator Store
6657
if: github.ref == 'refs/heads/main'

.lune/install.luau

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ local function installWallyPackagesForCodeSamples()
5858
end
5959

6060
local function installRobloxPackages()
61-
run("roblox-packages", { "install", "RobloxPackages" })
61+
run("roblox-packages", { "install", "RobloxPackagesTmp", "--version", "0.690.0.6900721" })
62+
63+
fs.move("RobloxPackagesTmp/Packages", "RobloxPackages")
64+
fs.removeDir("RobloxPackagesTmp")
6265

6366
-- Patch React and RoactCompat dependencies to use ours
6467
for _, name in { "React", "RoactCompat", "Roact" } do

rokit.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
darklua = "seaofvoices/darklua@0.17.1"
88
luau-lsp = "JohnnyMorganz/luau-lsp@1.53.2"
99
lune = "lune-org/lune@0.9.4"
10-
roblox-packages = "flipbook-labs/roblox-packages@0.1.0"
10+
roblox-packages = "flipbook-labs/roblox-packages@0.2.0"
1111
rojo = "rojo-rbx/rojo@7.5.1"
1212
selene = "Kampfkarren/selene@0.29.0"
1313
stylua = "JohnnyMorganz/StyLua@2.1.0"

0 commit comments

Comments
 (0)