Skip to content

ci(release): pin publish job to a named environment and tag refs - #142

Open
yakimoto wants to merge 1 commit into
mainfrom
ci/release-environment
Open

yakimoto wants to merge 1 commit into
mainfrom
ci/release-environment

Conversation

@yakimoto

@yakimoto yakimoto commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

User description

What this changes

One job in .github/workflows/release.ymlpublish, the only job in the pipeline that mints a short-lived OIDC identity and exchanges it for a registry publish credential. Two changes, no change to what gets built, tested, packed, or uploaded.

1. The publish job now declares a named environment. It previously declared none. environment: npm gives the run's OIDC token an environment claim, which is what lets the registry-side trusted-publisher configuration be pinned to that environment rather than accepting any workflow run from this repository. It is also the only hook a repository environment protection rule (required reviewer, tag-scoped deployment policy) can attach to — without a named environment there is nothing for such a rule to gate.

2. A ref floor on the credential-minting job. The publish job now carries an if: guard and runs only when one of three things is true: the run is an sdk-v* tag push, the run is a published release, or the run is a workflow_dispatch from the default branch. Anything else — a dispatch from a feature branch, a scratch branch — stops at this job instead of requesting the environment and reaching the registry.

The job-scoped id-token: write was already correct and is unchanged; it is now commented as load-bearing so a future edit does not hoist it to the workflow level, where every job in the pipeline would inherit the ability to mint a publishing identity. The separate SBOM job deliberately holds repository write and never the mint; that separation is preserved.

Why the ref guard is not redundant with the checks already here

The resolve-ref job already validates the tag against a full-anchored sdk-v<semver> regex, proves the tag resolves to a real commit object, and requires that commit to be an ancestor of origin/main. That chain guarantees the code this pipeline publishes was merged and reviewed on the default branch. It deliberately says nothing about the run's own ref.

That distinction matters, because the run's ref is not inert. It is the value that lands in the ref claim of the minted OIDC token, and it is what scopes the run's Actions cache. A workflow_dispatch triggered from an arbitrary branch would previously have satisfied every existing check — the tag it names is still ancestry-verified — while minting a publishing credential under that branch's identity and running inside that branch's cache scope. The guard closes exactly that gap and nothing else.

Why the third clause exists

A strict tag-push-only guard would have been simpler and wrong. This workflow has a deliberate, documented idempotent-backfill path: a maintainer dispatches it from the default branch naming an already-published tag, and the pipeline replays without re-publishing (the already-published check already skips the upload) so a missing release or asset can be filled in. Dropping that path to satisfy a tidier condition would have traded a working operational capability for a cosmetic one. The default-branch clause keeps the backfill and still excludes every other branch; the ancestry check continues to anchor which tree that dispatch may act on.

The clause is written to fail closed: format('refs/heads/{0}', github.event.repository.default_branch) yields refs/heads/ if the payload ever lacks default_branch, and that matches no real ref — so an unexpected event shape denies the publish rather than admitting it.

Note the downstream effect is already handled: the release job is gated on needs.publish.result == 'success', so a run where the guard denies publish leaves publish skipped and does not create a release either.

Verification

Actions runs are not currently executing on this organisation, so this was verified locally rather than by a green check on this PR:

  • actionlint .github/workflows/release.yml — exit 0, no findings.
  • The workflow parses as YAML and the resulting job graph is unchanged: resolve-ref, secret-scan, verify, publish, release, sbom.
  • Parsed publish job asserts, post-change: environment = npm, permissions = {id-token: write, contents: read}, workflow-level permissions = {contents: read}.
  • Diff is additive only: 25 lines, one file, no deletions.

Operator follow-up, not in this PR

This PR changes workflow files only. Naming an environment does not create it or protect it — that is repository configuration and is left entirely to a maintainer. Until the environment exists with a required reviewer and a tag-scoped deployment policy, and until the registry-side trusted publisher is updated to name the same environment, the if: guard above is the active control and the environment name is a declaration awaiting its other half.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Cursor Bugbot is generating a summary for commit cfd152a. Configure here.

Summary by Sourcery

Harden the release workflow by constraining publishing runs and associating npm publication with a named environment.

Bug Fixes:

  • Restrict the npm publishing job to SDK tag pushes, published releases, and default-branch manual dispatches, preventing arbitrary branch runs from minting publishing credentials.

Enhancements:

  • Pin the publishing job to the npm environment and preserve job-scoped OIDC permissions for trusted publishing and environment protection.

Review in cubic


CodeAnt-AI Description

Restrict npm publishing to approved release contexts

What Changed

  • npm publishing now runs only for sdk-v* tag pushes, published releases, or manual runs from the default branch
  • Publishing uses the named npm environment, enabling environment-specific trusted publishing and approval controls
  • The publishing credential remains limited to the publish job and is not available to other workflow jobs

Impact

✅ Fewer unauthorized publish attempts
✅ Environment-gated npm releases
✅ Reduced publishing credential exposure

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

The publish job is the only job that mints a short-lived OIDC identity and
exchanges it for a registry publish credential. Declare a named environment on
that job so the registry-side trusted publisher and a repository environment
protection rule have something to pin to, and add an if: guard so the job runs
only from a release tag push, a published release, or a default-branch dispatch
(the documented idempotent backfill path) -- never from an arbitrary branch.

The existing resolve-ref job validates the TAG (shape, existence, ancestry to
origin/main), which governs the code that gets published. It says nothing about
the run own ref, which is what lands in the OIDC token ref claim and scopes the
run Actions cache. This guard closes that gap. id-token: write stays scoped to
this job only; the workflow-level default remains contents: read.

Verified locally (org Actions runs are not executing): actionlint exit 0, YAML
parses, job graph unchanged, additive diff only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your workspace is out of credits. Ask your workspace admin to add credits to resume reviews. Manage billing

@sourcery-ai

sourcery-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Reviewer's Guide

The release workflow now gates its sole OIDC credential-minting job on trusted refs and binds it to the named npm environment, while preserving the existing build, verification, packaging, upload, and backfill behavior and least-privilege permission boundaries.

Flow diagram for the gated npm publish job

flowchart TD
    Start[Release workflow run] --> Guard{Publish ref/event allowed?}
    Guard -->|sdk-v* tag push| Publish[publish job]
    Guard -->|published release| Publish
    Guard -->|workflow dispatch on default branch| Publish
    Guard -->|anything else| Skip[Publish skipped]
    Publish --> Env[npm environment]
    Env --> OIDC[Mint OIDC identity]
    OIDC --> Registry[npm trusted publisher]
    Registry --> Upload[Publish package]
    Skip --> NoRelease[release job not created]
Loading

File-Level Changes

Change Details Files
Restrict the credential-minting publish job to trusted run refs while preserving supported release and backfill flows.
  • Add a fail-closed condition allowing SDK tag pushes, published releases, and default-branch manual dispatches only.
  • Keep downstream release creation dependent on successful publish, so disallowed runs stop before release work.
  • Document the distinction between validated source ancestry and the triggering run ref.
.github/workflows/release.yml
Bind npm publishing to a named environment and preserve least-privilege OIDC permissions.
  • Declare the npm environment and package URL on the publish job for environment-scoped OIDC claims and protection rules.
  • Keep id-token: write scoped only to publish and retain workflow-level contents: read.
  • Document that environment and registry trusted-publisher configuration require operator follow-up.
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codeant-ai

codeant-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR cfd152a Sep 12, 2026 · 17:23 17:24

@codeant-ai

codeant-ai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_d7523508-3ce2-4cd8-b64b-3f83fc42b9cb)

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c0fb681f-c216-42ae-b568-936dbcae49f2

📥 Commits

Reviewing files that changed from the base of the PR and between 3aec164 and cfd152a.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Included review availability: 5 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Macroscope - Approvability Check
  • GitHub Check: Sourcery review
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
.github/workflows/release.yml (1)

309-312: LGTM!

Also applies to: 315-319, 321-325


📝 Summary

Summary by CodeRabbit

  • Chores
    • Updated release publishing workflows to run for SDK version tags, release events, or approved manual dispatches.
    • Added package environment metadata to publishing runs.
    • Scoped publishing credentials to the release publishing job.

Walkthrough

The release workflow restricts the publish job to approved tags, release events, or default-branch dispatches. It adds npm environment metadata and keeps OIDC permissions scoped to the job.

Changes

Release publishing

Layer / File(s) Summary
Publish job guards and npm environment
.github/workflows/release.yml
The publish job adds execution conditions for SDK tags, release events, and default-branch runs. It adds the npm environment and package URL. OIDC permissions remain scoped to the job.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to cfd15

Publishing remains available through the documented tag and manual-dispatch paths, with no actionable merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: assigning the publish job to a named environment and restricting it to approved tag refs.
Description check ✅ Passed The description provides detailed What and Why sections and includes verification results, operational context, and scope. It does not include the template's exact Checklist section, but the required …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-environment
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch ci/release-environment

Comment @coderabbitai help to get the list of available commands.

@codeant-ai codeant-ai Bot added the size:S This PR changes 10-29 lines, ignoring generated files label Sep 12, 2026
@gitar-bot

gitar-bot Bot commented Sep 12, 2026

Copy link
Copy Markdown

Note

Automatic reviews are paused because your team has used its included automatic processing for this billing period (headroom scales with your seat count). You can still comment "Gitar review" to run one anytime, and automatic reviews resume on their own by October 1. Add seats for more headroom.
Learn more

Code Review ✅ Approved

Hardens the release workflow by pinning the npm publish job to a named environment and guarding it with a ref check that allows only SDK tag pushes, published releases, or dispatches from the default branch. This prevents arbitrary branch runs from minting publishing credentials while preserving the documented idempotent backfill path. No issues found.

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. If the ref guard or named environment is misconfigured, an unintended workflow run could mint an npm publishing credential and publish under the trusted publisher identity. Reverting prevents future runs, but any package publication or credential-backed access that already occurred would require separate remediation.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@macroscopeapp

macroscopeapp Bot commented Sep 12, 2026

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR changes the production npm release workflow's credential-minting gate and environment protection boundary. The ref filter and named environment affect which runs can publish and depend partly on external repository/registry configuration, so the change warrants human review.

Not approved because:

  • Credit balance exhausted. Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 1 file

Confidence score: 3/5

  • In .github/workflows/release.yml, default-branch backfills cannot reach the documented tag-only npm environment because deployment uses the branch ref rather than the sdk-v... input; allow the default branch in that environment.
  • In .github/workflows/release.yml, manual dispatches selecting an sdk-v* tag can satisfy a guard intended only for tag pushes; require github.event_name == 'push' alongside the tag check.
  • In .github/workflows/release.yml, the github.event_name == 'release' branch is unreachable because the workflow declares only tag pushes and workflow_dispatch; remove or replace the dead condition to keep the guard aligned with configured triggers.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release.yml">

<violation number="1" location=".github/workflows/release.yml:310">
P2: A manual dispatch whose selected ref is an `sdk-v*` tag also passes this clause, even though the guard promises to allow only a tag push. Require `github.event_name == 'push'` alongside `startsWith(...)` so dispatches cannot bypass the default-branch backfill boundary.</violation>

<violation number="2" location=".github/workflows/release.yml:311">
P2: The `github.event_name == 'release'` clause is dead code: release.yml's `on:` block only declares `push: tags ['sdk-v*']` and `workflow_dispatch` (lines 47-62), and this file is not a reusable workflow (no `workflow_call`), so no run of this workflow can ever have `event_name == 'release'`. The guard comment and the PR description advertise 'a published release' as a supported path that cannot actually occur. This doesn't widen access (release events never start the workflow), but it misrepresents the fail-closed guarantee in the one job that mints a publishing credential. Drop the clause or add the missing `release` trigger to `on:` if that path is genuinely intended.</violation>

<violation number="3" location=".github/workflows/release.yml:321">
P2: With the documented tag-only `npm` environment policy, a default-branch backfill never reaches this job because its deployment ref is the branch, not the `sdk-v...` input. Allow the default branch in that environment policy or use a tag-ref backfill path.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant GHA as GitHub Actions
    participant Publish as Publish Job
    participant Env as npm Environment
    participant OIDC as OIDC Provider
    participant NPM as npm Registry
    
    Note over GHA,NPM: Release Pipeline - Publish Gate Flow
    
    GHA->>Publish: Trigger workflow (event + ref)
    
    alt Valid publish trigger
        Note right of Publish: sdk-v* tag push OR release OR default branch dispatch
        Publish->>Publish: Check if guard condition met
        Publish->>Env: Request npm environment access
        Env->>Env: Validate repository protection rules
        alt Protection rules allow
            Env-->>Publish: Environment approved
            Publish->>OIDC: Request OIDC token (id-token: write)
            OIDC-->>Publish: Token with environment:npm + ref claim
            Publish->>NPM: Exchange OIDC token for publish credential
            NPM-->>Publish: Authenticated
            Publish->>NPM: Publish package
        else Protection rules deny
            Env-->>Publish: Denied
            Publish->>GHA: Job skipped - no publish
        end
    else Invalid trigger
        Note right of Publish: Feature branch dispatch or unexpected ref
        Publish->>Publish: Guard fails closed
        Publish->>GHA: Job skipped - no publish
    end
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

# `refs/heads/`, matching no real ref, so the guard fails CLOSED.
if: >-
startsWith(github.ref, 'refs/tags/sdk-v')
|| github.event_name == 'release'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The github.event_name == 'release' clause is dead code: release.yml's on: block only declares push: tags ['sdk-v*'] and workflow_dispatch (lines 47-62), and this file is not a reusable workflow (no workflow_call), so no run of this workflow can ever have event_name == 'release'. The guard comment and the PR description advertise 'a published release' as a supported path that cannot actually occur. This doesn't widen access (release events never start the workflow), but it misrepresents the fail-closed guarantee in the one job that mints a publishing credential. Drop the clause or add the missing release trigger to on: if that path is genuinely intended.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 311:

<comment>The `github.event_name == 'release'` clause is dead code: release.yml's `on:` block only declares `push: tags ['sdk-v*']` and `workflow_dispatch` (lines 47-62), and this file is not a reusable workflow (no `workflow_call`), so no run of this workflow can ever have `event_name == 'release'`. The guard comment and the PR description advertise 'a published release' as a supported path that cannot actually occur. This doesn't widen access (release events never start the workflow), but it misrepresents the fail-closed guarantee in the one job that mints a publishing credential. Drop the clause or add the missing `release` trigger to `on:` if that path is genuinely intended.</comment>

<file context>
@@ -296,8 +296,33 @@ jobs:
+    # `refs/heads/`, matching no real ref, so the guard fails CLOSED.
+    if: >-
+      startsWith(github.ref, 'refs/tags/sdk-v')
+      || github.event_name == 'release'
+      || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
     runs-on: ubuntu-latest
</file context>

# protection rule (required reviewer + tag-only deployment policy) gating
# the mint. Configuring that environment is an operator act, not this file.
environment:
name: npm

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: With the documented tag-only npm environment policy, a default-branch backfill never reaches this job because its deployment ref is the branch, not the sdk-v... input. Allow the default branch in that environment policy or use a tag-ref backfill path.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 321:

<comment>With the documented tag-only `npm` environment policy, a default-branch backfill never reaches this job because its deployment ref is the branch, not the `sdk-v...` input. Allow the default branch in that environment policy or use a tag-ref backfill path.</comment>

<file context>
@@ -296,8 +296,33 @@ jobs:
+    # protection rule (required reviewer + tag-only deployment policy) gating
+    # the mint. Configuring that environment is an operator act, not this file.
+    environment:
+      name: npm
+      url: https://www.npmjs.com/package/@wave-av/sdk
+    # `id-token: write` lives here and NOWHERE else; the workflow-level default
</file context>

# -- and nothing else. A missing `default_branch` makes `format(...)` yield
# `refs/heads/`, matching no real ref, so the guard fails CLOSED.
if: >-
startsWith(github.ref, 'refs/tags/sdk-v')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: A manual dispatch whose selected ref is an sdk-v* tag also passes this clause, even though the guard promises to allow only a tag push. Require github.event_name == 'push' alongside startsWith(...) so dispatches cannot bypass the default-branch backfill boundary.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 310:

<comment>A manual dispatch whose selected ref is an `sdk-v*` tag also passes this clause, even though the guard promises to allow only a tag push. Require `github.event_name == 'push'` alongside `startsWith(...)` so dispatches cannot bypass the default-branch backfill boundary.</comment>

<file context>
@@ -296,8 +296,33 @@ jobs:
+    # -- and nothing else. A missing `default_branch` makes `format(...)` yield
+    # `refs/heads/`, matching no real ref, so the guard fails CLOSED.
+    if: >-
+      startsWith(github.ref, 'refs/tags/sdk-v')
+      || github.event_name == 'release'
+      || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
</file context>
Suggested change
startsWith(github.ref, 'refs/tags/sdk-v')
github.event_name == 'push' && startsWith(github.ref, 'refs/tags/sdk-v')

@yakimoto
yakimoto enabled auto-merge September 12, 2026 21:19
@yakimoto
yakimoto disabled auto-merge September 14, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant