Add plugin upload workflow and related enhancements

- Introduced a new upload workflow for the Atlas plugin to Roblox using Lune and OpenCloud.
- Added `UploadDetails.json` to store plugin metadata.
- Updated `build.rs` to include `UploadDetails.json` in the plugin snapshot.
- Enhanced `plugin.project.json` to reference the new `UploadDetails`.
- Added a new submodule for `opencloud-execute` to facilitate plugin uploads.
- Created scripts for publishing the plugin via both PowerShell and Bash.
- Updated GitHub Actions workflow to include steps for installing Rokit and uploading the plugin.

These changes aim to streamline the plugin release process and improve integration with Roblox's marketplace.
This commit is contained in:
Joe 2026-02-19 06:12:03 -06:00
parent 8cf140af3a
commit 4918fb80c7
16 changed files with 752 additions and 19 deletions

View file

@ -1,14 +1,9 @@
# Build and publish the Rojo plugin to the Creator Store
# Loads API key from .env file, ROBLOX_API_KEY env var, or -ApiKey argument.
# Get an API key at https://create.roblox.com/credentials (assets read+write).
param(
[string]$ApiKey
)
# Build and publish the Atlas plugin to the Creator Store via OpenCloud.
# Loads env vars from .env file in the repo root.
# Required .env vars: PLUGIN_UPLOAD_TOKEN, PLUGIN_CI_UNIVERSE_ID, PLUGIN_CI_PLACE_ID
$ErrorActionPreference = "Stop"
# Load .env file if it exists
$envFile = Join-Path $PSScriptRoot "..\.env"
if (Test-Path $envFile) {
foreach ($line in Get-Content $envFile) {
@ -22,16 +17,14 @@ if (Test-Path $envFile) {
}
}
# Resolve API key: argument > env var > .env (already loaded above)
if (-not $ApiKey) {
$ApiKey = $env:ROBLOX_API_KEY
}
if (-not $ApiKey -or $ApiKey -eq "your-key-here") {
Write-Host "Error: No API key provided." -ForegroundColor Red
Write-Host "Set ROBLOX_API_KEY in .env, env var, or pass -ApiKey <key>" -ForegroundColor Yellow
if (-not $env:PLUGIN_UPLOAD_TOKEN) {
Write-Host "Error: PLUGIN_UPLOAD_TOKEN not set. Add it to .env or set as env var." -ForegroundColor Red
exit 1
}
$env:RBX_API_KEY = $env:PLUGIN_UPLOAD_TOKEN
$env:RBX_UNIVERSE_ID = $env:PLUGIN_CI_UNIVERSE_ID
$env:RBX_PLACE_ID = $env:PLUGIN_CI_PLACE_ID
Write-Host "Building and uploading plugin..." -ForegroundColor Cyan
cargo run -- upload plugin.project.json --asset_id 111151139098227
lune run upload-plugin Atlas.rbxm

27
scripts/publish-plugin.sh Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Build and publish the Atlas plugin to the Creator Store via OpenCloud.
# Loads env vars from .env file in the repo root.
# Required .env vars: PLUGIN_UPLOAD_TOKEN, PLUGIN_CI_UNIVERSE_ID, PLUGIN_CI_PLACE_ID
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ENV_FILE="$SCRIPT_DIR/../.env"
if [ -f "$ENV_FILE" ]; then
set -a
source "$ENV_FILE"
set +a
fi
if [ -z "${PLUGIN_UPLOAD_TOKEN:-}" ]; then
echo "Error: PLUGIN_UPLOAD_TOKEN not set. Add it to .env or set as env var." >&2
exit 1
fi
export RBX_API_KEY="$PLUGIN_UPLOAD_TOKEN"
export RBX_UNIVERSE_ID="${PLUGIN_CI_UNIVERSE_ID:-}"
export RBX_PLACE_ID="${PLUGIN_CI_PLACE_ID:-}"
echo "Building and uploading plugin..."
lune run upload-plugin Atlas.rbxm