Skip to content

update the release action to version bump pacakge and manifest #5

Closed

Description

@techsavvyash

We require the versions in manifest and package to be the same as that of the release, update the github action to take care of it.

Activity

  1. techsavvyash commented on Oct 3, 2025

    @techsavvyash
    OwnerAuthor

    @claude please pick and raise a PR for this issue.

  2. claude commented on Oct 3, 2025

    @claude

    Claude finished @techsavvyash's task —— View job


    Issue #5: Update Release Action for Version Bumping

    Tasks

    • Gather context: Read CLAUDE.md and explore repository structure
    • Locate release GitHub Action workflow
    • Locate package.json and manifest files
    • Understand current release process
    • Modify release action to version bump package.json and manifest.json
    • Attempted to commit and push changes

    ⚠️ Permission Limitation

    I've successfully created the code changes needed to update the release workflow, but I'm unable to push changes to workflow files in .github/workflows/ due to GitHub App permissions (the workflows permission is required but not granted).

    📋 Changes Required

    Here are the changes that need to be made to .github/workflows/release.yaml. Add these two steps after the "Extract version from branch" step and before the "Check if tag already exists" step:

          - name: Update package.json and manifest.json versions
            run: |
              VERSION="${{ steps.extract_version.outputs.version }}"
              echo "Updating version to $VERSION in package.json and manifest.json"
    
              # Update package.json
              cd packages/plugin
              sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json
    
              # Update manifest.json
              sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" manifest.json
    
              # Show the changes
              echo "Updated package.json:"
              grep "version" package.json
              echo "Updated manifest.json:"
              grep "version" manifest.json
    
              cd ../..
    
          - name: Commit version changes
            run: |
              git config --local user.email "action@github.com"
              git config --local user.name "GitHub Action"
              git add packages/plugin/package.json packages/plugin/manifest.json
              git diff --staged --quiet || git commit -m "chore: bump version to ${{ steps.extract_version.outputs.version }}"
              git push origin "${GITHUB_REF#refs/heads/}"

    How It Works

    When a release branch is created (e.g., release/1.0.0), the updated workflow will:

    1. Extract the version from the branch name (1.0.0)
    2. Update packages/plugin/package.json with the new version
    3. Update packages/plugin/manifest.json with the new version
    4. Commit and push these changes to the release branch
    5. Continue with the existing build and release process

    This ensures the versions in both files always match the release tag.

    Next Steps

    You'll need to manually apply these changes to the workflow file. You can find more information about this limitation in the FAQ.


    Job Run | Branch

  3. techsavvyash commented on Oct 3, 2025

    @techsavvyash
    OwnerAuthor

    @claude it shows that the perm is available, try pushing these changes once again.

  4. claude commented on Oct 3, 2025

    @claude

    Claude finished @techsavvyash's task —— View job


    Issue #5: Update Release Action for Version Bumping

    Tasks

    • Read repository guidelines (CLAUDE.md)
    • Read current release workflow file
    • Modify release.yaml to add version bumping steps
    • Attempted to commit and push changes

    ⚠️ Permission Still Required

    I've successfully created the code changes locally, but the push is still being rejected with:

    refusing to allow a GitHub App to create or update workflow `.github/workflows/release.yaml` without `workflows` permission
    

    The GitHub App needs the workflows permission explicitly granted to modify files in .github/workflows/. This is a GitHub security measure to prevent unauthorized workflow modifications.

    📋 Solution Options

    Option 1: Grant Workflows Permission
    You can grant the workflows permission to the Claude Code GitHub App in your repository settings under Settings → Actions → General → Workflow permissions.

    Option 2: Apply Changes Manually
    Here are the exact changes to make to .github/workflows/release.yaml. Add these two steps after line 25 (after "Extract version from branch") and before "Check if tag already exists":

          - name: Update package.json and manifest.json versions
            run: |
              VERSION="${{ steps.extract_version.outputs.version }}"
              echo "Updating version to $VERSION in package.json and manifest.json"
    
              # Update package.json
              cd packages/plugin
              sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json
    
              # Update manifest.json
              sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" manifest.json
    
              # Show the changes
              echo "Updated package.json:"
              grep "version" package.json
              echo "Updated manifest.json:"
              grep "version" manifest.json
    
              cd ../..
    
          - name: Commit version changes
            run: |
              git config --local user.email "action@github.com"
              git config --local user.name "GitHub Action"
              git add packages/plugin/package.json packages/plugin/manifest.json
              git diff --staged --quiet || git commit -m "chore: bump version to ${{ steps.extract_version.outputs.version }}"
              git push origin "${GITHUB_REF#refs/heads/}"

    How It Works

    When a release branch is created (e.g., release/1.0.0), the updated workflow will:

    1. Extract the version from the branch name (1.0.0)
    2. Update packages/plugin/package.json with the new version
    3. Update packages/plugin/manifest.json with the new version
    4. Commit and push these changes to the release branch
    5. Continue with the existing tag creation and release process

    This ensures the versions in both files always match the release tag.

    Additional Information

    For more details about this limitation and workarounds, see the FAQ.


    Job Run | Branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions