Skip to content

fix(ci): use github.token instead of secrets.GITHUB_TOKEN for gh CLI#51

Merged
jhamon merged 1 commit intomainfrom
fix/release-workflow-gh-token
Feb 5, 2026
Merged

fix(ci): use github.token instead of secrets.GITHUB_TOKEN for gh CLI#51
jhamon merged 1 commit intomainfrom
fix/release-workflow-gh-token

Conversation

@jhamon
Copy link
Contributor

@jhamon jhamon commented Feb 5, 2026

Summary

  • Fixes release workflow failure by using github.token instead of secrets.GITHUB_TOKEN for the GH_TOKEN environment variable in the draft release creation step

Root Cause

The GitHub CLI (gh) requires GH_TOKEN to be set to github.token in GitHub Actions workflows. Using secrets.GITHUB_TOKEN caused the workflow to fail with exit code 4:

gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example:
  env:
    GH_TOKEN: ${{ github.token }}

Test Plan

  • Manually trigger the release workflow in a test run
  • Verify the draft release is created successfully
  • Confirm no exit code 4 errors

Fixes https://github.com/pinecone-io/pinecone-mcp/actions/runs/21404698668


Note

Low Risk
Single-line CI/workflow change limited to GitHub release automation; minimal blast radius outside the release job.

Overview
Fixes the GitHub Actions release workflow by changing the GH_TOKEN env var for the gh release create step from secrets.GITHUB_TOKEN to github.token, preventing draft release creation failures during prod releases.

Written by Cursor Bugbot for commit 2cefae0. This will update automatically on new commits. Configure here.

The gh CLI in GitHub Actions requires GH_TOKEN to be set to github.token
rather than secrets.GITHUB_TOKEN. This was causing the release workflow to
fail with exit code 4 when attempting to create draft releases.

Fixes the error: "gh: To use GitHub CLI in a GitHub Actions workflow, set
the GH_TOKEN environment variable."

Co-authored-by: Cursor <cursoragent@cursor.com>
@jhamon jhamon merged commit ffd5cbe into main Feb 5, 2026
4 checks passed
@jhamon jhamon deleted the fix/release-workflow-gh-token branch February 5, 2026 22:52
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