-
-
Notifications
You must be signed in to change notification settings - Fork 130
docs(cli): document the new experimental deploy/QA plugins #587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| --- | ||
| sidebar_position: 6 | ||
| slug: /cli/experimental-plugins | ||
| --- | ||
|
|
||
| # Experimental Plugins | ||
|
|
||
| These CLI plugins are functional but new, not published to npm, and not loaded by default - opt in | ||
| with `--plugin <name>`. Expect rough edges, and verify against a test target (a test repo, a test | ||
| itch.io channel) before pointing any of them at something real. | ||
|
|
||
| ## Deploy to a GitHub Release | ||
|
|
||
| `@game-ci/github-release-deploy` attaches a built output to a GitHub Release. | ||
|
|
||
| ```bash | ||
| GITHUB_TOKEN=... game-ci \ | ||
| --plugin @game-ci/github-release-deploy \ | ||
| deploy github-release ./build --repo owner/repo --tag v1.2.3 | ||
| ``` | ||
|
Comment on lines
+16
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
# Find existing token-permission guidance before adding or updating it.
rg -n -C 4 'GITHUB_TOKEN|permissions:|contents: write' .Repository: game-ci/documentation Length of output: 50380 🏁 Script executed: set -euo pipefail
printf '%s\n' '--- repository guidance ---'
find /tmp/coderabbit-repo-knowledge/game-ci-documentation-0d982650 -maxdepth 2 -type f -name '*.md' -print \
| sort \
| while read -r f; do
case "$f" in
*/learnings/*) ;;
*) printf '\n### %s\n' "$f"; head -80 "$f" ;;
esac
done
printf '%s\n' '--- target page ---'
cat -n docs/03-github-cli/06-experimental-plugins.mdxRepository: game-ci/documentation Length of output: 5365 🌐 Web query:
💡 Result: To create a release and upload release assets using the GitHub REST API with a fine-grained personal access token, you must grant the Contents permission with write access [1][2][3]. The Contents permission specifically covers repository content, commits, branches, downloads, releases, and merges [1][3]. Key implementation details include: 1. Permission Scope: Ensure your fine-grained token has Repository permissions set to Contents: read and write [1][4]. 2. Release Creation: Use the Create a release endpoint (POST /repos/{owner}/{repo}/releases). Note that if the release targets a commit that modifies files under.github/workflows/, you must also have the Workflows permission set to write [5][6]. 3. Asset Upload: The Create a release response returns an upload_url. You must use this specific URL to upload your release assets [5][7]. Upload the raw binary content of the asset as the request body, and include the appropriate Content-Type header (e.g., application/zip) [7]. If you receive a 403 or 404 error, you can use the X-Accepted-GitHub-Permissions header in the API response to verify the specific permissions required for your request [8]. Citations:
Document the required GitHub token permission. GitHub Release creation and asset upload require 🤖 Prompt for AI Agents |
||
|
|
||
| `buildPath` may be a single file (uploaded as-is, optionally renamed via `--assetName`) or a | ||
| directory - every top-level file inside it is uploaded as a separate asset, named after itself. | ||
| Re-running against the same tag is idempotent: an existing release for that tag is reused, and an | ||
| asset that already exists on it is replaced rather than failing. | ||
|
|
||
| | Option | Description | | ||
| | ------------------- | --------------------------------------------------------------------- | | ||
| | `--repo` | `owner/repo`. Defaults to `$GITHUB_REPOSITORY`. | | ||
| | `--tag` | Release tag. Required. | | ||
| | `--releaseNotes` | Release body/description. | | ||
| | `--draft` | Create the release as a draft. | | ||
| | `--prerelease` | Mark the release as a prerelease. | | ||
| | `--assetName` | Override the uploaded asset's file name (single-file buildPath only). | | ||
| | `--targetCommitish` | Commit/branch to create the tag from, if it doesn't already exist. | | ||
|
|
||
| GitLab Release support isn't included in this first version. | ||
|
|
||
| ## Deploy to itch.io | ||
|
|
||
| `@game-ci/itch-deploy` wraps itch.io's official `butler push` CLI. | ||
|
|
||
| ```bash | ||
| BUTLER_API_KEY=... game-ci \ | ||
| --plugin @game-ci/itch-deploy \ | ||
| deploy itch ./build --user myuser --game mygame --channel windows | ||
| ``` | ||
|
|
||
| Requires `butler` already installed and on `PATH` (or pass `--butlerPath` explicitly - recommended | ||
| for CI determinism). This plugin doesn't install butler for you. | ||
|
|
||
| | Option | Description | | ||
| | --------------- | ------------------------------------------------------------- | | ||
| | `--user` | itch.io username or organization. Required. | | ||
| | `--game` | itch.io game slug. Required. | | ||
| | `--channel` | Channel to push to, e.g. `windows`, `linux`, `web`. Required. | | ||
| | `--butlerPath` | Explicit path to the butler executable. | | ||
| | `--userVersion` | Custom version string shown in itch.io's build history. | | ||
| | `--ignore` | Comma-separated glob patterns excluded from the push. | | ||
|
|
||
| ## Pseudo-localization QA | ||
|
|
||
| `@game-ci/pseudo-localization` injects pseudo-loc strings pre-translation, to catch UI | ||
| overflow/truncation and missing-localization bugs before real translation work starts. | ||
|
|
||
| ```bash | ||
| game-ci --plugin @game-ci/pseudo-localization pseudo-localize ./Localization | ||
| ``` | ||
|
|
||
| Reads a flat key→string localization table - `<projectPath>/<sourceLocale>.json` or `.csv` - and | ||
| writes the pseudo-localized result to `<projectPath>/<outputLocale>.<same format>`. Engine-specific | ||
| structured formats (e.g. Unity's binary StringTable assets) aren't supported yet; export through a | ||
| flat table as an intermediate step if your project uses one. | ||
|
|
||
| The transform combines three techniques: accented-character substitution (so any string that skips | ||
| the pipeline stands out), length expansion (`--expansionFactor`, default `1.3` - most languages run | ||
| 30-50% longer than English), and bracket markers around each string (catches concatenation bugs). | ||
| Format placeholders (`{0}`, `%s`) and simple markup (`<b>...</b>`) are left untouched. | ||
|
|
||
| | Option | Description | | ||
| | ------------------- | -------------------------------------------------------------------- | | ||
| | `--sourceLocale` | Source locale to read. Default `en`. | | ||
| | `--outputLocale` | Locale code the output table is written under. Default `qps-ploc`. | | ||
| | `--expansionFactor` | Length multiplier applied to each string. Default `1.3`. | | ||
| | `--outputPath` | Directory to write the output table into. Defaults to `projectPath`. | | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: game-ci/documentation
Length of output: 50380
🏁 Script executed:
Repository: game-ci/documentation
Length of output: 20833
Add a supported installation path for the unpublished plugins.
The plugin-loading documentation defines bare
--pluginvalues as npm packages and requires unpublished plugins to use a local path. These commands pass unpublished package names, so users cannot load the plugins. Add checkout/build/local-path instructions or publish the packages.🤖 Prompt for AI Agents