Skip to content

ci: pass the release tag to the publish script through env - #46

Merged
shenxianpeng merged 1 commit into
mainfrom
ci/release-tag-via-env
Oct 22, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
ci/release-tag-via-env

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Before: the publish-mcp-registry job spliced the release tag into its script:

run: |
  TAG="${{ github.event.release.tag_name }}"

GitHub substitutes ${{ }} into the script text before bash runs it, and a tag name can hold shell syntax ($(...), ;, | are all legal in a ref name). That job holds id-token: write for the MCP Registry login. Only someone who can create a release picks the tag, so this is hardening rather than an open hole.

After: the tag comes in through env: and the script reads $RELEASE_TAG; the next step reads $VERSION the same way.

Checked with bash, using a tag name that git check-ref-format accepts:

 tag name: v1.0.0$(echo${IFS}INJECTED>&2)
-before: INJECTED            ← the command in the tag ran
-        tag=v1.0.0
+after:  tag=v1.0.0$(echo${IFS}INJECTED>&2)

A normal tag like v0.3.0 still gives version=0.3.0.

Summary by CodeRabbit

  • Chores
    • Updated the release publishing workflow to pass release information consistently when publishing to the MCP Registry. Existing tag fallback and version extraction behavior remain unchanged. This update does not change the features or behavior available in the product.

The tag name was spliced into the run script with ${{ }}, so a tag
holding shell syntax would have run in the job that holds the MCP
Registry OIDC token. Read it from the environment instead.
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a88e5497-10f2-4b87-8304-599ce5f45601
📥 Commits

Reviewing files that changed from the base of the PR and between 3f391a8 and 2a66d4f.

📒 Files selected for processing: 1
  • .github/workflows/publish.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The publishing workflow now passes the release tag and extracted version to shell scripts through environment variables. The existing tag fallback remains unchanged.

Changes: Publish workflow inputs

Layer / File(s) Summary
Pass release values to scripts
.github/workflows/publish.yml
The workflow passes the release tag and extracted version to shell scripts through environment variables. The empty-tag fallback remains unchanged.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 2a66d

The publish workflow passes release values as data rather than shell code. No issue requiring a fix before merge was identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: passing the release tag to the publish script through an environment variable.
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.
Full details: Docstring Coverage

Explanation

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 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@shenxianpeng shenxianpeng self-assigned this Oct 22, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3f391a8) to head (2a66d4f).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #46   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          279       279           
=========================================
  Hits           279       279           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shenxianpeng
shenxianpeng merged commit f1b2211 into main Oct 22, 2026
9 checks passed
@shenxianpeng
shenxianpeng deleted the ci/release-tag-via-env branch October 22, 2026 21:18
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.

2 participants