Skip to content

fix(ci): use github.token instead of CI_GITHUB_TOKEN#20

Merged
jbdevprimary merged 1 commit into
mainfrom
fix/use-github-token
Dec 25, 2025
Merged

fix(ci): use github.token instead of CI_GITHUB_TOKEN#20
jbdevprimary merged 1 commit into
mainfrom
fix/use-github-token

Conversation

@jbdevprimary
Copy link
Copy Markdown
Contributor

@jbdevprimary jbdevprimary commented Dec 25, 2025

Quick fix: CI_GITHUB_TOKEN secret is empty/invalid. Use github.token which works with contents:write permissions.


Note

Switches the release job in ci.yml to use the default github.token (granted via job permissions) instead of secrets.CI_GITHUB_TOKEN.

  • Updates checkout to use token: ${{ github.token }} and persists credentials
  • Replaces GH_TOKEN/custom secret with GITHUB_TOKEN/${{ github.token }} for git config, semantic-release, and GitHub release steps
  • Minor step name/comment cleanups; no other functional changes

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

The CI_GITHUB_TOKEN secret is not accessible/empty. Since this job has contents:write
permissions, github.token should work for pushing commits and tags.

This simplifies the workflow and removes dependency on external secret configuration.
@jbdevprimary jbdevprimary merged commit 00abfaf into main Dec 25, 2025
16 of 19 checks passed
@jbdevprimary jbdevprimary deleted the fix/use-github-token branch December 25, 2025 07:07
cursor Bot pushed a commit that referenced this pull request Dec 25, 2025
After 3 iterations of workflow improvements (#16, #19, #20), identified that the
root blocker is repository branch protection rules that prevent semantic-release
from pushing to main, even with elevated tokens.

Documented multiple solution paths including bypass configuration and manual
release process. Repository is 100% ready for 1.0, only automation is blocked.
jbdevprimary added a commit that referenced this pull request Dec 25, 2025
* docs: update status with branch protection blocker analysis

After 3 iterations of workflow improvements (#16, #19, #20), identified that the
root blocker is repository branch protection rules that prevent semantic-release
from pushing to main, even with elevated tokens.

Documented multiple solution paths including bypass configuration and manual
release process. Repository is 100% ready for 1.0, only automation is blocked.

* feat(ci): implement official python-semantic-release GitHub Action

Complete rewrite using official best practices from python-semantic-release docs:

### Key Changes

1. **Official GitHub Action** (python-semantic-release/python-semantic-release@v9.14.0)
   - Recommended approach from official documentation
   - Handles all version bumping, commits, and tagging
   - Works with GitHub's permissions model

2. **Proper Permissions**
   - contents:write for commits/tags
   - id-token:write for PyPI Trusted Publishing
   - persist-credentials:true for git operations

3. **Simplified Flow**
   - No manual git configuration needed
   - No credential helper hacks
   - Action handles branch protection correctly

4. **Updated pyproject.toml**
   - Added remote.type = "github"
   - Added commit_parser_options for conventional commits
   - Configured changelog generation

5. **PyPI Publishing**
   - Uses newly synced PYPI_TOKEN
   - verbose:true for debugging
   - skip-existing:true for safety

### Why This Works

The official action is designed to work with GitHub's branch protection and
permissions model. It uses the GITHUB_TOKEN correctly and doesn't try to push
directly - it uses the GitHub API when needed.

Follows: https://python-semantic-release.readthedocs.io/en/latest/configuration/automatic-releases/github-actions.html

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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