Lesson 11 of 11
Capstone, part 4: ship it to staging (private publish, CI and deploy)
Part 4 of the Beacon Yard capstone is the real ship-it milestone: private publish, local and GitHub Actions CI green, Open Cloud staging deploy with m14-ship's workflow, and the Studio ship-readiness check.
By the end you can
- Publish your extended m14-ship game privately, enable Studio API access, and prove zero real ids leaked into Git
- Get every check in .github/workflows/ci.yml green on your fork (format, lint, type check, ids, build, milestones) plus your Studio playtests
- Run a dry-run and a real staging deploy through scripts/publish-place.mjs and .github/workflows/deploy.yml while keeping the experience Private
Before this: Capstone, part 3: multi-product receipts and party matchmaking, Continuous integration: every check, blocking, Deploying with Open Cloud: staging and production, Unit tests with Jest-Lua
Step 1 of 7
Step 1: private publish and git-ignored ids
Before any live DataStore, localization table check, or Open Cloud deploy can run, your experience needs a real Universe ID and Place ID1. Keep its access setting Private the entire time so strangers never join your test build.
Server sideRemember: Experiences and places is a campus of buildings.
At m14-ship, default.project.json ships with StreamingEnabled = true (128 to 512 studs) and LocalizationService.BeaconStrings mapped from src/locale/Strings.csv2. Every account number stays at 0 in tracked src/shared/Ids.luau and is overridden locally by git-ignored src/shared/Ids.local.luau.
"StreamingEnabled": true,
"StreamingMinRadius": 128,
"StreamingTargetRadius": 512
Where do your staging UNIVERSE_ID and PLACE_ID belong so your game works locally while scripts/check-ids.mjs stays green in CI?
Press 1 to 4 to choose, Enter to check.
Step 2 of 7
Step 2: local checks and CI green on your fork
At m14-ship, .github/workflows/ci.yml runs nine jobs on pushes and pull requests: commits (commit subjects, on pull requests), format, lint, types, ids, challenges, build, milestones and actions-pinned. The build job makes both the main place and the Jest-Lua test place.
jobs:
commits:
name: commit subjects
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- name: Validate pull request commit subjects
run: node scripts/check-commit-range.mjs ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
format:
name: format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: CompeyDev/setup-rokit@1d9390883f7ebce19d48f5b8d006e11d387c92ab # v0.2.1
with:
version: v1.2.0
- name: stylua --check .
run: stylua --check .
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: CompeyDev/setup-rokit@1d9390883f7ebce19d48f5b8d006e11d387c92ab # v0.2.1
with:
version: v1.2.0
- name: selene src tests
run: selene src tests
- name: selene unit
run: selene unit
types:
name: type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: CompeyDev/setup-rokit@1d9390883f7ebce19d48f5b8d006e11d387c92ab # v0.2.1
with:
version: v1.2.0
- name: wally install
run: wally install
- name: scripts/typecheck.sh
run: bash scripts/typecheck.sh
ids:
name: id guard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: node scripts/check-ids.mjs
Run the formatting, lint, type, ID and build checks locally before pushing your capstone branch. The type check is a bash script. In PowerShell, a bare bash can resolve to the WSL launcher instead of Git Bash, so the Windows block calls the Git Bash program that the Git for Windows installer put in Program Files:
Windows
stylua --check .
selene src tests unit
wally install
& "$env:ProgramFiles\Git\bin\bash.exe" scripts/typecheck.sh
node scripts/check-ids.mjs
New-Item -ItemType Directory -Force build | Out-Null
rojo build default.project.json -o build/beacon-yard.rbxlx
rojo build test.project.json -o build/beacon-yard-tests.rbxlx
macOS
stylua --check .
selene src tests unit
wally install
bash scripts/typecheck.sh
node scripts/check-ids.mjs
mkdir -p build
rojo build default.project.json -o build/beacon-yard.rbxlx
rojo build test.project.json -o build/beacon-yard-tests.rbxlx
You add lastDaily to DataMigration.template() in Project 2, but forget to add lastDaily: number to export type ProfileData. Which job in m14-ship's ci.yml catches that mistake?
Press 1 to 4 to choose, Enter to check.
Step 3 of 7
Step 3: Open Cloud staging deploy with deploy.yml
Open .github/workflows/deploy.yml and scripts/publish-place.mjs at m14-ship. Notice three studio safety choices built into them34:
deploy.ymlnever runs on an ordinary push; it runs only on manualworkflow_dispatch(pickinglobby,yard, orboth) or a published GitHub Release.concurrencyallows one deploy at a time and setscancel-in-progress: false, so a running upload is never killed halfway.- Secrets (
ROBLOX_API_KEYandIDS_LOCAL_LUAU) live on the repository environment (production, which you point at your private staging experience during this capstone), so pull requests from forks can never read them.
on:
workflow_dispatch:
inputs:
places:
description: Which place to publish
type: choice
options:
- both
- lobby
- yard
default: both
release:
types: [published]
# One deploy at a time, and a running deploy is never cancelled halfway.
concurrency:
group: deploy
cancel-in-progress: false
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
scripts/publish-place.mjs sends a PATCH to Roblox's Open Cloud Assets API (https://apis.roblox.com/assets/v1/assets/<placeId>) with multipart form data (request JSON + fileContent .rbxlx), then polls the returned operations/... path every two seconds until body.done is true5.
async function publish(place) {
const url = `${API}/assets/${place.id}`;
const request = `{"assetId": ${place.id}, "assetType": "Place", "published": true}`;
console.log(`${place.name}: PATCH ${url}`);
console.log(`${place.name}: request ${request}, fileContent ${path.basename(file)} (${contentTypes[ext]})`);
if (dryRun) {
return;
}
const form = new FormData();
form.append("request", request);
form.append("fileContent", new Blob([readFileSync(file)], { type: contentTypes[ext] }), path.basename(file));
const response = await fetch(url, { method: "PATCH", headers: { "x-api-key": key }, body: form });
const text = await response.text();
if (!response.ok) {
fail(`${place.name}: ${response.status} ${text}`);
}
let operation;
try {
operation = JSON.parse(text).path;
} catch {
fail(`${place.name}: unexpected response ${text}`);
}
if (typeof operation !== "string" || !operation.startsWith("operations/")) {
fail(`${place.name}: unexpected response ${text}`);
}
// The upload is processed in the background. Poll until it says done.
for (let attempt = 1; attempt <= 60; attempt++) {
await new Promise((resolve) => setTimeout(resolve, 2000));
const poll = await fetch(`${API}/${operation}`, { headers: { "x-api-key": key } });
const pollText = await poll.text();
let body;
try {
body = JSON.parse(pollText);
} catch {
fail(`${place.name}: polling ${operation} gave ${poll.status} ${pollText}`);
}
if (!poll.ok) {
fail(`${place.name}: polling ${operation} gave ${poll.status} ${pollText}`);
}
if (body.done) {
if (body.error) {
fail(`${place.name}: publish failed: ${body.error.code} ${body.error.message}`);
}
// A finished upload that is not published is a saved draft, not a
// deploy: players still run the old version, so the job must fail.
if (body.response?.isPublished !== true) {
Where does it break?โA campus of buildingsโ is a good picture of experiences and places. Where does it stop being true?
It breaks here. A campus has one copy of each building, but Roblox runs many copies of the same place at once, one per server, and those copies know nothing about each other.
The true model. An experience holds places. Every server runs its own copy of one place for the players on it. Servers share nothing unless the game uses a cross-server service such as DataStores or MessagingService.
The yard publish finishes while two servers are still running the old revision. Do those servers immediately switch to the new revision?
Press 1 to 2 to choose, Enter to check.
Other ways pros do this
| Option | What it is | When pros pick it | Trade-offs |
|---|---|---|---|
| GitHub Actions + scripts/publish-place.mjs (Open Cloud Assets API) | Runs format, lint, typecheck, Rojo build, and PATCHes the Assets API using an environment-scoped key. | Every team that wants repeatable, audited deploys straight from Git. | Requires rotating the Open Cloud API key before it expires and protecting the GitHub environment. |
| Studio File > Publish to Roblox | Manual upload from Roblox Studio. | First-time place creation and quick solo prototypes. | Easy to accidentally publish unformatted code, uncommitted changes, or the wrong branch. |
| CLI wrappers (such as rbxcloud) | Prebuilt binaries wrapping Open Cloud endpoints. | Teams that want one CLI for places, DataStores and MessagingService without writing Node scripts. | Adds another external binary to pin and update; the raw Assets API is under 130 lines of Node. |
Before running the real script, verify how publish-place.mjs constructs its target URL and request JSON in this quick check:
After scripts/publish-place.mjs receives HTTP 200 from PATCH /assets/v1/assets/<placeId>, why does it loop and fetch operations/... every two seconds?
Press 1 to 4 to choose, Enter to check.
Step 4 of 7
Build and grade Project 7: ship to staging
Follow the four steps below on your own fork of Beacon Yard, keeping your experience Private throughout.
Build along
src/shared/Ids.local.example.luau.github/workflows/ci.yml.github/workflows/deploy.ymlscripts/publish-place.mjs
Publish your
m14-shipplace privately from Studio, turn on Enable Studio Access to API Services under Game Settings > Security, copysrc/shared/Ids.local.example.luautosrc/shared/Ids.local.luauwith your staging ids, and runnode scripts/check-ids.mjs.You should see Creator Hub shows a Private staging experience, Studio Access to API Services is on, Ids.local.luau holds your UNIVERSE_ID and PLACE_ID, and node scripts/check-ids.mjs exits 0.
Run the local check commands from Step 2 and run the full playtest suite (
ServerScriptService.RunGameTests:Invoke()) in Studio Play mode.You should see stylua --check ., selene src tests unit, bash scripts/typecheck.sh, both rojo builds and Studio's ServerScriptService.RunGameTests:Invoke() all pass.
Commit your capstone edits on a feature branch (check
git statusfirst soIds.local.luauandbuild/stay untracked), push the branch to your fork withgit push origin <branch>, and confirm CI turns green. Then open theevery milestone tagjob and read its last line. It should saycheck-milestones: 15 tag(s) passed. If it saysNo tags match, the job passed without building a single milestone, because the tags never reached your fork. Rungit push origin --tagsand re-run the job.You should see Your pull request or branch on your GitHub fork shows every job in ci.yml green, with no Ids.local.luau or build/ files committed.
Run
node scripts/publish-place.mjs lobby build/beacon-yard.rbxlx --dry-runlocally. Then create an environment namedproductionin your fork (Settings > Environments) and addROBLOX_API_KEY(Assets Read+Write scoped to your staging experience only) andIDS_LOCAL_LUAUto it, becausedeploy.ymlonly reads secrets from an environment calledproduction. Open Actions > deploy > Run workflow, choose your capstone branch under Use workflow from, setplaces = lobby(orbothif you created both places), and verify the new version in Version History6. The Run workflow button only appears oncedeploy.ymlexists on your fork's default branch.You should see Dry-run prints the target Assets API URL without needing a key; then Actions > deploy publishes a new revisionId to your private staging place, visible in Creator Hub Version History.
Open your privately published staging place in Studio, press Play and run game.ServerScriptService.RunGameTests:Invoke("capstone_ship", "capstone-ship") in the server command bar.
Level 3, Professional
Challenge
The seven checks run inside Studio only, plus ship_ids_match once the place is published. They cannot see your fork, GitHub Actions or Creator Hub, so a pass code alone proves the build is healthy, not that you shipped. Verify your published staging build with challenges/capstone_ship.luau in Studio, then work through the criteria marked as yours to verify and the CI and staging deploy walkthrough. Solution: challenges/solutions/capstone-ship.md.
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("capstone_ship", "capstone-ship")in the server command bar. Copy the pass code from Output.
Done means
- Pass code: Ids.UNIVERSE_ID and Ids.PLACE_ID are positive numbers from git-ignored Ids.local.luau (ship_ids_set). In your published staging place ship_ids_match also passes: Ids.UNIVERSE_ID equals game.GameId, and game.PlaceId is Ids.PLACE_ID or Ids.YARD_PLACE_ID. In a place that is not published yet, GameId and PlaceId are 0, so ship_ids_match prints TEST SKIP instead of failing, and a skip proves nothing about your ids. node scripts/check-ids.mjs passes
- Pass code: Workspace.StreamingEnabled is true, LocalizationService.BeaconStrings exists, and all six Remotes exist
- Pass code: the Config contract numbers and the FlagService.multiplier clamp are intact
- Pass code: DataService.store() is non-nil, which shows the place is published and Studio Access to API Services is on. It does not show the audience, so you check in Creator Hub that the experience is Private. challenges/capstone_ship.luau must print TEST PASS for all seven checks
- You verify, the test does not: every job in your fork's ci.yml is green and the `every milestone tag` job reports 15 tags passed, and your deploy run published a new version to your private staging place, visible in Version History
Six checks in capstone_ship.luau print TEST PASS, but ship_api_access prints TEST FAIL (DataService.store() is nil). What is the fix?
Press 1 to 4 to choose, Enter to check.
Why does .github/workflows/deploy.yml set concurrency with cancel-in-progress: false?
Press 1 to 4 to choose, Enter to check.
Step 5 of 7
Optional: pick two more challenges from the rest of the course
Once your seven capstone projects pass, pick two extra graded challenges for your portfolio. Start from m14-ship to get all the test files in one checkout. The table shows the milestones that introduced the game features each challenge uses.
Reference Graded challenges and their feature milestones
Every challenge file lives under challenges/ in the game repository with its solution under challenges/solutions/. Check challenges/README.md for the full index.
m06-drone-wrench- Rate-limit the shop remote on the server.
m06-drone-wrench- Add an Overtime phase between Active and Cooldown.
m07-feel- Add a HighContrast option stored as a server player attribute.
m08-crawler- Configure PathfindingService material costs so the crawler avoids pads.
m09-react-shop- Fix '1 coins' to '1 coin' in ShopLabels.
m10-memory- Add dronesDowned to DataMigration.template() and verify Reconcile().
m11-two-places- Add a third PlaceRole (Practice) to PlaceRole.resolve.
m12-money- Insert an OpenedShop step into the onboarding funnel.
m13-art-pass- Make drone rotors spin faster as the drone takes damage.
m14-ship- Add a start and end window to the Scrap Rush event flag.
m14-ship- Add a full German (de) column to src/locale/Strings.csv.
m14-ship- Extra practice with pure Luau tests for shipping.
Checkpoint
0 of 5 checked
You want to try both the profilestore challenge (m10-memory) and the flag-schedule challenge (m14-ship). Which single checkout has the code and test files for both?
Press 1 to 4 to choose, Enter to check.
Step 6 of 7
Optional: design and live-ops deliverables
Shipping clean Luau proves you can build a feature; studios also look for judgement on economy balance and live operations. Add two short design documents to docs/ in your capstone fork as optional portfolio deliverables. They prepare you directly for Module 14's Economy design: sources, sinks and the spreadsheet and Module 15's The live-ops calendar: seasons, events and the content pipeline and Pro capstone, part 1: plan and build Season 2.
Level 2, Builder
Challenge
Write a one-page economy model for your extended Beacon Yard in docs/economy-model.md. This is an optional self-check deliverable for your portfolio.
- Start from
- The game at milestone m14 (download)
Done means
- A one-page docs/economy-model.md listing every coin source (pads, survival bonus, crawler bounty, Coin Pack) and sink (Speed, Shield) from Config.luau
- Estimated coins per hour and rounds to afford Speed and Shield for three player types: casual (2 pads/round), regular (4 pads/round) and heavy (6 pads/round)
- Names the exact point where coin inflation begins (once Speed is owned and Shield is capped at 1) and proposes one repeatable sink with its price and expected drain per hour
Meet the criteria above, then record your own result. No test grades this check.
Level 2, Builder
Challenge
Write a 4-week live-ops plan for your game in docs/liveops-plan.md, ready to share with a team or attach to your portfolio.
- Start from
- The game at milestone m14 (download)
Done means
- A 4-week schedule in docs/liveops-plan.md covering four weekly beats (mixing Config-driven events like Scrap Rush with small content or tuning updates)
- Each beat names its Config key or release version, primary KPI, guardrail KPI, communication timing and QA gate
- Includes a rollback and kill-switch rule stating which flag turns each event off without a publish and when outdated servers must restart
Meet the criteria above, then record your own result. No test grades this check.
Why does a one-page economy model test casual, regular and heavy players separately instead of using one average player?
Press 1 to 4 to choose, Enter to check.
Step 7 of 7
Recap
Retiring the analogy
You no longer need โa campus of buildingsโ. An experience holds places. Every server runs its own copy of one place for the players on it. Servers share nothing unless the game uses a cross-server service such as DataStores or MessagingService.
Recap
- Private publishing with git-ignored Ids.local.luau keeps real account numbers out of Git while enabling live DataStores and Open Cloud deploys.
- Running format, lint, type check, ids and both Rojo builds locally mirrors .github/workflows/ci.yml before you push.
- scripts/publish-place.mjs and .github/workflows/deploy.yml publish via the Open Cloud Assets API, poll the async operation until done, and protect secrets inside a GitHub environment.
Experiences and places is a campus of buildings, until a campus has one copy of each building, but Roblox runs many copies of the same place at once, one per server, and those copies know nothing about each other.
Queued for review
- Where do your staging UNIVERSE_ID and PLACE_ID belong so your game works locally while scripts/check-ids.mjs stays green in CI?
- You add lastDaily to DataMigration.template() in Project 2, but forget to add lastDaily: number to export type ProfileData. Which job in m14-ship's ci.yml catches that mistake?
- After scripts/publish-place.mjs receives HTTP 200 from PATCH /assets/v1/assets/<placeId>, why does it loop and fetch operations/... every two seconds?
- You want to try both the profilestore challenge (m10-memory) and the flag-schedule challenge (m14-ship). Which single checkout has the code and test files for both?