docs(plugin): enhance skills with game patterns and troubleshooting (… #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Plugin | |
| on: | |
| push: | |
| paths: | |
| - '.claude-plugin/**' | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| bump_type: | |
| description: 'Version bump type' | |
| required: true | |
| default: 'patch' | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| jobs: | |
| release-plugin: | |
| runs-on: ubuntu-latest | |
| # Only run on master branch, skip automated version bump commits | |
| if: | | |
| (github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch') && | |
| (github.event_name == 'workflow_dispatch' || !contains(github.event.head_commit.message || '', 'chore(plugin): bump version')) | |
| steps: | |
| # Generate GitHub App token for authenticated commits (same as release.yml) | |
| - name: Generate GitHub App Token | |
| id: generate-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.RELEASE_APP_ID }} | |
| private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.generate-token.outputs.token }} | |
| - name: Bump plugin version | |
| id: bump | |
| run: | | |
| BUMP_TYPE="${{ github.event.inputs.bump_type || 'patch' }}" | |
| CURRENT=$(jq -r '.version' .claude-plugin/plugin.json) | |
| IFS='.' read -r major minor patch <<< "$CURRENT" | |
| case $BUMP_TYPE in | |
| major) NEW_VERSION="$((major+1)).0.0" ;; | |
| minor) NEW_VERSION="$major.$((minor+1)).0" ;; | |
| patch) NEW_VERSION="$major.$minor.$((patch+1))" ;; | |
| esac | |
| jq --arg v "$NEW_VERSION" '.version = $v' .claude-plugin/plugin.json > tmp.json | |
| mv tmp.json .claude-plugin/plugin.json | |
| echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT | |
| echo "Bumped plugin version from $CURRENT to $NEW_VERSION" | |
| # Commit and push changes (identical pattern to release.yml) | |
| - name: Commit and push changes | |
| run: | | |
| # Use GitHub's bot email format so the app avatar shows on commits | |
| # The user ID (257041894) is from: gh api '/users/jengine-release-bot[bot]' --jq '.id' | |
| # This is different from the App ID - it's the bot account's user ID | |
| git config user.name "jengine-release-bot[bot]" | |
| git config user.email "257041894+jengine-release-bot[bot]@users.noreply.github.com" | |
| git add .claude-plugin/plugin.json | |
| git commit -m "chore(plugin): bump version to ${{ steps.bump.outputs.version }}" | |
| git push origin ${{ github.ref_name }} | |
| echo "✅ Committed and pushed changes" | |
| # Create Git tag | |
| - name: Create Git tag | |
| run: | | |
| git tag "plugin-v${{ steps.bump.outputs.version }}" | |
| git push origin "plugin-v${{ steps.bump.outputs.version }}" | |
| echo "✅ Created and pushed tag plugin-v${{ steps.bump.outputs.version }}" |