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.

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

Steam Workshop / mod-publishing plugin. **Not functional yet** - structural
skeleton only. Mirrors `@game-ci/steam-deploy`'s `deploy <target>` dispatch
shape, so it reuses core's existing `deploy` command registration rather
than needing a new one.

## Why this, distinct from steam-deploy

`@game-ci/steam-deploy` uploads a full game build via `appbuild.vdf`. This
uploads a Workshop _item_ (a mod, map, or asset pack) via SteamCMD's
separate `workshop_build_item.vdf` format and `+workshop_build_item`
command - a genuinely different upload target and VDF schema, not a
variation of the same thing. Real demand: any Workshop-integrated game
currently has zero game-ci coverage for this.

## What's real vs. TODO

- Plugin/command registration shape: real, mirrors `steam-deploy`.
- `execute()`: throws immediately, pointing here.

## Remaining work before this is real

1. Verify the exact `workshop_build_item.vdf` schema (`appid`,
`contentfolder`, `previewfile`, `vdfpath`/`publishedfileid` for
updates vs. new items, `visibility`) against real SteamCMD Workshop
docs/behavior.
2. Handle the new-item vs. update-existing-item distinction - a new item
has no `publishedfileid` yet and one needs to be captured from
SteamCMD's output and surfaced as a command output (the same way
`steam-deploy` captures `steam_build_id`).
3. Reuse `@game-ci/steam-deploy`'s SteamCMD local/Docker execution and
output-parsing infrastructure rather than duplicating it, if a shared
`@game-ci/steam-shared` package ends up making sense once both exist.
4. Tests once the above is real.
32 changes: 32 additions & 0 deletions plugins/steam-workshop/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@game-ci/steam-workshop",
"version": "0.0.1",
"description": "Steam Workshop / mod-publishing plugin (draft). Wraps SteamCMD's workshop_build_item.vdf upload path for mods/maps/asset packs - a distinct target and VDF schema from a full game build (see @game-ci/steam-deploy).",
"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"
}
}
44 changes: 44 additions & 0 deletions plugins/steam-workshop/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Steam Workshop / mod-publishing plugin - DRAFT.
*
* Plan: `game-ci deploy steam-workshop <buildPath> --appId --itemId`
* wraps SteamCMD's workshop_build_item.vdf upload path - a genuinely
* different VDF schema and upload target from @game-ci/steam-deploy's
* full-game appbuild.vdf. This is for mods, maps, and asset packs, not a
* whole game build.
*
* NOTE: mirrors steam-deploy's `deploy <target>` dispatch shape (already
* registered in core - see game-ci/cli#123), so this doesn't need a new
* core command registration, unlike most of the other drafts.
*/

export const steamWorkshopPlugin = {
name: "steam-workshop",
version: "0.0.1",

commands: [
{
engine: "*",
createCommand(command: string, subCommands: string[]) {
if (command === "deploy" && subCommands[0] === "steam-workshop") {
return {
name: "Deploy steam workshop",
async configureOptions() {
// TODO: register --appId, --itemId (omit to publish a new item),
// --title, --description, --changeNote, --visibility, --previewImage.
},
async execute(): Promise<boolean> {
throw new Error(
"Steam Workshop publishing is not implemented yet (draft plugin). " +
"See plugins/steam-workshop/README.md for the planned workshop_build_item.vdf shape.",
);
},
};
}
return null;
},
},
],
};

export default steamWorkshopPlugin;
19 changes: 19 additions & 0 deletions plugins/steam-workshop/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