You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detect merged TypeScript SDK version bumps and create an annotated typescript-sdk-v<version> tag on the exact merge commit.
Build, test, and publish the tagged artifact in dependent jobs in the same workflow.
Keep release-control checks and npm environment approval in the release path.
Why
A version bump in packages/sdk-typescript/package.json is the release signal. A version-bump PR may include SDK source or dependency changes; the generated tag points to the exact merged commit, which is then built, tested, and published.
Release flow
A merged PR touching packages/sdk-typescript/package.json starts Tag and Publish TypeScript SDK.
The tag job reads package metadata from merge_commit_sha, validates the version bump and lockfile, and creates typescript-sdk-v<version>.
The dependent jobs verify the tag, build/test the exact merge commit, run release-control preflight, and publish the artifact after npm environment approval.
The tag remains the immutable release marker. Because it is created with GITHUB_TOKEN, it intentionally does not start a second workflow; publishing is a dependent job in this same workflow. No manual workflow trigger or downstream workflow dispatch is required.
Required repository configuration
Allow the GitHub Actions actor/integration to bypass creation/update/deletion of the protected typescript-sdk-v* tag ruleset. The current ruleset has user bypass actors only, so this must be updated before the workflow can create the tag.
Keep the npm environment configured with required reviewers and prevent self-review.
Keep npm Trusted Publishing configured for repository gemini/developer-platform, workflow filename publish-typescript-sdk.yml, environment npm, and npm publish.
No GitHub App credentials or SDK_RELEASE_TAG_RULESET_READY variable are required.
Validation
Parsed the workflow YAML with yq.
Syntax-checked all embedded Node scripts and shell blocks.
Verified the workflow has no stale tag-event, App-token, or explicit chaining references.
Verified the current SDK package and lockfile metadata and the version-diff guard.
No SDK runtime tests were run because this is workflow-only code.
This PR introduces a pull_request_target-triggered workflow that mints a GitHub App installation token with Contents: write access to auto-tag SDK releases, and requires adding the App as a bypass actor on the protected typescript-sdk-v* tag ruleset — a new privileged automation path controlling the npm publish pipeline for @gemini-markets/sdk. Risk is substantially mitigated by SHA-pinned actions, strict input validation on all PR event data (SHA format, numeric PR number, semver pattern), the merged == true guard preventing triggering on fork PRs, and publish workflow hardening that verifies commit alignment and rejects force-pushed or lightweight tags.
Security scans: ⚠️ Not configured — Semgrep OSS, scan_for_secrets, Scan with Semgrep, Socket Security: Pull Request Alerts not found
Testing summary: ✅ Found in PR description
Summary: Workflow YAML syntax and configuration were validated using yq, with embedded Node scripts and shell blocks checked and no stale references or version inconsistencies identified. SDK runtime tests were not performed as the code is workflow-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
typescript-sdk-v<version>tag on the exact merge commit.Why
A version bump in
packages/sdk-typescript/package.jsonis the release signal. A version-bump PR may include SDK source or dependency changes; the generated tag points to the exact merged commit, which is then built, tested, and published.Release flow
packages/sdk-typescript/package.jsonstartsTag and Publish TypeScript SDK.tagjob reads package metadata frommerge_commit_sha, validates the version bump and lockfile, and createstypescript-sdk-v<version>.The tag remains the immutable release marker. Because it is created with
GITHUB_TOKEN, it intentionally does not start a second workflow; publishing is a dependent job in this same workflow. No manual workflow trigger or downstream workflow dispatch is required.Required repository configuration
typescript-sdk-v*tag ruleset. The current ruleset has user bypass actors only, so this must be updated before the workflow can create the tag.npmenvironment configured with required reviewers and prevent self-review.gemini/developer-platform, workflow filenamepublish-typescript-sdk.yml, environmentnpm, andnpm publish.No GitHub App credentials or
SDK_RELEASE_TAG_RULESET_READYvariable are required.Validation
yq.