Release #16
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 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bump: | |
| description: "Version bump type" | |
| required: true | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| ref: main | |
| - name: Bump version | |
| id: bump | |
| run: | | |
| current=$(jq -r '.metadata.version' .claude-plugin/marketplace.json) | |
| IFS='.' read -r major minor patch <<< "$current" | |
| if [ "${{ inputs.bump }}" = "minor" ]; then | |
| minor=$((minor + 1)) | |
| patch=0 | |
| else | |
| patch=$((patch + 1)) | |
| fi | |
| new="${major}.${minor}.${patch}" | |
| echo "version=${new}" >> "$GITHUB_OUTPUT" | |
| jq --arg v "$new" '.metadata.version = $v' .claude-plugin/marketplace.json > tmp.json | |
| mv tmp.json .claude-plugin/marketplace.json | |
| jq --arg v "$new" '.version = $v' .codex-plugin/plugin.json > tmp.json | |
| mv tmp.json .codex-plugin/plugin.json | |
| - name: Commit and tag | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add .claude-plugin/marketplace.json .codex-plugin/plugin.json | |
| git commit -m "Release v${{ steps.bump.outputs.version }}" | |
| git tag "v${{ steps.bump.outputs.version }}" | |
| git push origin main --tags | |
| - name: Create GitHub release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create "v${{ steps.bump.outputs.version }}" \ | |
| --title "v${{ steps.bump.outputs.version }}" \ | |
| --generate-notes | |
| permissions: {} |