Instruction file imported from Datanana-com/beamworks-php (
.github/instructions/sdk-sync.instructions.md). Copyright stays with the author.
SDK Sync
SDK location
sdk/ — gitignored; local dev copy only; never committed.
generated/ — PHP + cdef artifacts (SteamTypes.php, CallbackRegistry.php, steam_api.cdef.h, sdk-version.json) are committed to git and ship in the Composer tarball, so composer require works without running codegen; only generated/bin and generated/steam_api.json are gitignored; produced by pipeline; never hand-edit.
bin/sync-sdk
Args: --sdk-path=/path/to/unpacked/sdk.
Steps:
- Validate path exists + contains
public/steam/steam_api.json - Read version from
Readme.txtvia regex (e.g.Steamworks SDK v1.64) - Write
generated/sdk-version.json:{"sdk_version":"1.64","json_sha256":"…","synced_at":"2026-03-01T00:00:00+00:00"} - Copy
public/steam/steam_api.json→generated/steam_api.json - Copy platform libs →
generated/bin/(libsteam_api.so,steam_api64.dll, etc.)
bin/codegen
Reads: generated/steam_api.json (preferred) OR sdk/public/steam/steam_api.json (fallback).
Emits: generated/steam_api.cdef.h, generated/SteamTypes.php, generated/CallbackRegistry.php.
Partner cookie secret
STEAMWORKS_PARTNER_COOKIE in GitHub Secrets. Used by sdk-bump.yml to authenticate SDK download.
NEVER log, echo, or interpolate into error messages. Pass only via curl -b header.
SDK bump PR convention
Branch: sdk-bump-auto. Title: chore(sdk): bump to vX.Y.
Only diff: files under generated/ + generated/sdk-version.json.
No src/ changes in a bump PR. If TypeMap/Overrides need updates → separate PR.
Workflow trigger
Manual only (workflow_dispatch). Input: sdk_url (direct download URL for SDK zip).
Workflow: checkout → install PHP + composer → download SDK with cookie → sync-sdk → codegen → create-pull-request.