A collection of Luau scripts for CI/CD tasks. Designed to be used as a Git submodule across Luau projects.
Add this repository as a Git submodule...
git submodule add git@github.com:horsenuggets/luau-cicd.git Submodules/luau-cicdThen run scripts directly...
./Submodules/luau-cicd/Scripts/CheckFormatting.exec.luau
./Submodules/luau-cicd/Scripts/BumpVersion.exec.luau patchThese scripts replace inline shell in GitHub Actions workflows. The workflow templates in
Templates/workflows/ already use them. Pass GitHub expressions through env: and quote
them as arguments, so they are never interpolated into the shell...
- name: Check branch name format
env:
BRANCH: ${{ github.head_ref }}
run: ./Submodules/luau-cicd/Scripts/CheckBranchName.exec.luau "$BRANCH"Every script reports failures as ::error:: annotations on stderr and exits with status
1. Here's what each one does...
CheckBranchName <branch>→ Requires<prefix>/<name>in lowercase kebab-case.CheckReleaseTitle <title>→ Requires exactlyRelease X.Y.Z, optionally with a SemVer prerelease suffix like-beta.6.CheckReleaseTitleVersion <title>→ Requires the title to match theVERSIONfile.CheckDiffWithMain→ Fetchesmainand requiresHEADto have an identical tree.CheckWallyAuth→ RequiresWALLY_AUTHunless there is nowally.tomlor the package is private.GetReleaseInfo→ Writesversion,tag, andnotes_filetoGITHUB_OUTPUT, with the notes taken from the matchingCHANGELOG.mdsection.CreateGitTag <tag>→ Creates the release tag and pushes it toorigin.PublishToWally→ WritesWALLY_AUTHto~/.wally/auth.tomland runswally publish, skipping in the same cases asCheckWallyAuth.CreateGitHubRelease <tag> <notes> [assets...]→ Publishes the release withgh, after checking that every asset is nonempty and every ZIP asset is intact.PackageBinary <name> <target>→ ZipsBuild/<name>(orBuild/<name>.exe) intoBuild/<name>-<os>-<x64|arm64>.zipand writes its path toGITHUB_OUTPUTasarchive.GetReleaseAssetSuffix <os>-<arch>→ Prints the canonical asset suffix described below.
Release assets use a canonical <os>-<arch> suffix. Supported operating systems are
linux, macos, and windows. Architectures x86_64 and x64 normalize to x64, and
aarch64 and arm64 normalize to arm64...
target=linux-x86_64
suffix=$(./Submodules/luau-cicd/Scripts/GetReleaseAssetSuffix.exec.luau "$target")
# "$suffix" is "linux-x64". "$target" remains "linux-x86_64".The script writes exactly one suffix and a newline to stdout. Invalid arguments produce a diagnostic on stderr and leave stdout empty. Apply the suffix only when naming release assets, and keep compiler triples, build matrix targets, and required CI job names unchanged.