Commit graph

3 commits

Author SHA1 Message Date
seavor
7f5d8732bb [Protocol] Simplify publish workflow
- Coerce Cockatrice release tags (YYYY-MM-DD-Release-X.Y.Z) to semver
  so npm version accepts them; hard-fail on tag-format drift.
- Replace hand-rolled npm publish with JS-DevTools/npm-publish@v4
  for native skip-when-unchanged and OIDC provenance.
- Drop redundant publish flag and workflow_dispatch version input.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 16:49:20 -05:00
ZeldaZach
b870ce0a4a
[Protocol] Inline package assembly, fix cmake-format, add workflow_dispatch
- Replace the custom Node packaging script with a flat inline step
  (cp the .proto glob, cp the static files, npm version) so the
  workflow speaks the same shell idiom as the other workflows.
- Promote package.json and README.md to static files under
  libcockatrice_protocol/npm/ so contributors edit them in-place.
- Re-format libcockatrice_protocol/CMakeLists.txt per .cmake-format.json.
- Add workflow_dispatch (manual run; optional version input) and
  timeout-minutes: 10.
- Drop --provenance from npm publish: GitHub Packages doesn't
  attest Sigstore provenance.
2026-05-23 13:15:33 -04:00
ZeldaZach
cc4a53b850
[Protocol] Single-source-of-truth protocol version + publish @cockatrice/protocol
The protocol version is now declared once in libcockatrice_protocol/protocol_version.json.
CMake reads it at configure time and emits a generated protocol_version.h exposing
COCKATRICE_PROTOCOL_VERSION; remote_client.cpp and serversocketinterface.cpp both
pick it up via the existing libcockatrice_protocol link.

The same JSON file is bundled into a new @cockatrice/protocol npm package
(scripts/package-protocol.mjs + .github/workflows/protocol-publish.yml) so
TypeScript consumers (Sockatrice/webclient) can derive PROTOCOL_VERSION from the
identical source instead of hand-typing the literal. The workflow dry-runs
npm pack on PRs and publishes to GitHub Packages on stable releases only.
2026-05-23 13:00:05 -04:00