Skip to content

Add publish-v1-specs workflow - #195

Open
zacchua-stripe wants to merge 3 commits into
masterfrom
zacchua/publish-private-preview-workflow
Open

Add publish-v1-specs workflow#195
zacchua-stripe wants to merge 3 commits into
masterfrom
zacchua/publish-private-preview-workflow

Conversation

@zacchua-stripe

@zacchua-stripe zacchua-stripe commented Aug 20, 2026

Copy link
Copy Markdown

What

Follow up to https://docs.google.com/document/d/1RH_6VhWlPGnBX17bwu1WWXCaBjDO3CtKqg7nfRdLS8o/edit?tab=t.0. This PR adds .github/workflows/publish-v1-specs.yml a workflow that sits downstream of the LockAndPublishPrivatePreviewSpecs, pulls the specs from the CDN and publishes v1 private-preview specs for a given API version.

It is functionally equivalent to the private-preview (beta) path of pay-server's api-codegen/tools/publish.sh. The difference is that specs are pulled from the CDN instead of a local build dir.

How it works

  1. Checks out openapi with full history + tags.
  2. Checks out stripe/sdk-codegen@v17.0.0 + just + Node 24 to provide the diff CLI.
  3. Downloads required specs and optional fixtures from the CDN into openapi/.
  4. Commits fixtures, then the private-preview spec, if changed. When the spec changes, generates rest.md + 7 per-language diffs, commits upcoming-changes/, tags vN, and pushes atomically.

dry_run

A dry_run input (default true) fetches, builds, and diffs but does not touch master or tags. Instead it force-pushes the local commits to a disposable branch so you can inspect exactly what a real run would commit. Tags are never created/pushed in a dry run.

Context

Triggered by the zoolander LockAndReleasePrivatePreviewSpecs workflow, which currently dispatches stripe/openapi under a PLACEHOLDER_WORKFLOW_NAME. Swapping that placeholder for this workflow's filename is a separate, follow-up mint PR.

Note: a full end-to-end test requires a dry-run zoolander run to first publish a version to the CDN.

zacchua-stripe and others added 2 commits August 20, 2026 14:57
Adds a workflow_dispatch workflow that publishes v1 private-preview specs
for a given API version and cuts a release, mirroring the private-preview
(beta) path of pay-server's api-codegen/tools/publish.sh.

It pulls the specs from the Statics Commander CDN (instead of a local build
dir), commits them to master, generates per-language diffs against the
private-preview spec, and tags the release. Triggered by the zoolander
LockAndReleasePrivatePreviewSpecs workflow.

A dry_run input (default true) fetches, builds, and diffs without pushing,
uploading the would-be output as an artifact for inspection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Committed-By-Agent: claude
- Diff the GA spec (openapi/spec3.sdk.yaml), old-tag vs. working tree,
  exactly as publish.sh's beta path does, instead of the private-preview spec.
- In dry-run, force-push local commits to a disposable dry-run/private-preview
  branch for inspection instead of uploading an artifact; never create or push
  a tag (a stray vN would corrupt the next real run's describe increment).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Committed-By-Agent: claude
Comment thread .github/workflows/publish-private-preview.yml Outdated
Comment thread .github/workflows/publish-private-preview.yml Outdated
Adds a `mode` choice input (private-preview / public-preview / GA / all).
Only private-preview is implemented; the other channels fail fast at a new
"Resolve mode configuration" step until the zoolander dispatcher and CDN keys
for them are wired up. Mode-specific values (CDN subpath, spec/fixture
filenames, commit and tag messages, dry-run branch) are resolved into env vars
so the download and release steps stay mode-agnostic. Dry-run branch is now
dry-run/<mode>.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Committed-By-Agent: claude
@zacchua-stripe
zacchua-stripe marked this pull request as ready for review August 21, 2026 18:28
@zacchua-stripe
zacchua-stripe requested a review from xavdid August 21, 2026 18:28
@zacchua-stripe zacchua-stripe changed the title Add publish-private-preview workflow Add publish-v1-specs workflow Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant