Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions plugins/itch-deploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# @game-ci/itch-deploy (draft)

itch.io deploy plugin. **Not functional yet** - structural skeleton only.
Mirrors `@game-ci/steam-deploy`'s shape: engine-agnostic, dispatched via
the `deploy` command's `'*'` engine wildcard. Not wired into core's
default load list.

## Why itch.io

Huge game-jam/indie audience, currently all ad hoc third-party GitHub
Actions. itch.io's official `butler` CLI is straightforward, so this
should be one of the faster ones to bring to real functionality once
someone picks it up.

## What's real vs. TODO

- Plugin/command registration shape: real, mirrors `steam-deploy`'s
`deploy <target>` dispatch.
- `execute()`: throws immediately, pointing here.

## Remaining work before this is real

1. Wrap `butler push <buildPath> <user>/<game>:<channel>`, including
butler's own login/credential handling (an API key, likely via
`BUTLER_API_KEY` env var, matching steam-deploy's env-var-only
credential convention - never CLI args).
2. Decide how `game-ci deploy itch` needs core's `deploy <target>
[buildPath]` yargs registration extended, if at all (steam-deploy
already required a core change here - see game-ci/cli#123 - itch may
reuse it as-is once its own options are registered via
`configureOptions`).
3. Tests mirroring `steam-deploy`'s `parse-steamcmd-output.test.ts` and
`vdf-generator.test.ts` pattern - butler's own output has a similar
"did this actually succeed" ambiguity worth checking.
32 changes: 32 additions & 0 deletions plugins/itch-deploy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@game-ci/itch-deploy",
"version": "0.0.1",
"description": "itch.io deploy plugin (draft). Wraps butler push for itch.io channel deploys.",
"license": "MIT",
"repository": "git@github.com:game-ci/cli.git",
"files": [
"dist"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"bun": "./src/index.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "tsc",
"test": "vitest run",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@types/node": "^17.0.23",
"typescript": "4.7.4",
"vitest": "^4"
},
"engines": {
"node": ">=18.x"
}
}
41 changes: 41 additions & 0 deletions plugins/itch-deploy/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* itch.io deploy plugin - DRAFT.
*
* Plan: `game-ci deploy itch <buildPath> --user --game --channel`,
* wrapping itch.io's official `butler push` CLI. Structurally identical
* to @game-ci/steam-deploy (engine-agnostic, dispatched via the '*'
* engine wildcard on the `deploy` command) - butler's actual invocation
* shape and channel-naming conventions need verification before this is
* functional.
*/

export const itchDeployPlugin = {
name: "itch-deploy",
version: "0.0.1",

commands: [
{
engine: "*",
createCommand(command: string, subCommands: string[]) {
if (command === "deploy" && subCommands[0] === "itch") {
return {
name: "Deploy itch",
async configureOptions() {
// TODO: register --user, --game, --channel options, matching
// butler's <user>/<game>:<channel> target format.
},
async execute(): Promise<boolean> {
throw new Error(
"itch.io deploy is not implemented yet (draft plugin). " +
"See plugins/itch-deploy/README.md for the planned `butler push` invocation.",
);
},
};
}
return null;
},
},
],
};

export default itchDeployPlugin;
19 changes: 19 additions & 0 deletions plugins/itch-deploy/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es2022",
"lib": ["es2022"],
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"noImplicitAny": false,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"types": ["node"]
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.test.ts", "dist"]
}
Loading