Add .env to .gitignore and update dependencies

- Added .env file to .gitignore to prevent environment secrets from being tracked.
- Updated Cargo.lock to include new dependencies: mime, mime_guess, and unicase.
- Modified Cargo.toml to enable multipart feature for reqwest.
- Introduced a new PowerShell script for building and publishing the Rojo plugin.
- Removed deprecated auth_cookie.rs file and adjusted upload command for new upload methods.
This commit is contained in:
Joe 2026-02-09 22:20:33 -06:00
parent 7b73720143
commit 2803c2d73a
7 changed files with 274 additions and 68 deletions

View file

@ -0,0 +1,37 @@
# 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
)
$ErrorActionPreference = "Stop"
# Load .env file if it exists
$envFile = Join-Path $PSScriptRoot "..\.env"
if (Test-Path $envFile) {
foreach ($line in Get-Content $envFile) {
$line = $line.Trim()
if ($line -and -not $line.StartsWith("#")) {
$key, $value = $line -split "=", 2
if ($key -and $value) {
[Environment]::SetEnvironmentVariable($key.Trim(), $value.Trim(), "Process")
}
}
}
}
# 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
exit 1
}
Write-Host "Building and uploading plugin..." -ForegroundColor Cyan
cargo run -- upload plugin.project.json --asset_id 111151139098227