|
21 | 21 | env: |
22 | 22 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
23 | 23 | PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |
24 | | - GH_TOKEN: ${{ secrets.GH_TOKEN }} |
25 | 24 |
|
26 | 25 | steps: |
27 | 26 | - uses: actions/checkout@v4 |
@@ -92,26 +91,17 @@ jobs: |
92 | 91 | sed -i "s/__version__ = .*/__version__ = \"$VERSION\"/" python/__init__.py |
93 | 92 | fi |
94 | 93 |
|
95 | | - # ---- Commit & Tag version bump ---- |
| 94 | + # Commit, tag, and push |
96 | 95 | - name: Commit and tag version bump |
97 | 96 | run: | |
98 | | - git config user.name "GitHub Actions" |
99 | | - git config user.email "actions@github.com" |
100 | | - |
101 | | - # Add all changed files |
102 | | - git add typescript/package.json modelcontextprotocol/package.json |
103 | | - git add python/pyproject.toml || echo "No pyproject.toml to add" |
104 | | - git add python/src/__init__.py || echo "No src/__init__.py to add" |
105 | | - git add python/__init__.py || echo "No __init__.py to add" |
106 | | - |
107 | | - # Commit if there are changes |
108 | | - if git diff --staged --quiet; then |
109 | | - echo "No changes to commit" |
110 | | - else |
111 | | - git commit -m "chore: version bump to v${{ steps.bump_npm.outputs.version }} [skip ci]" |
112 | | - git tag v${{ steps.bump_npm.outputs.version }} |
113 | | - git push origin main --tags |
114 | | - fi |
| 97 | + git config user.name "github-actions[bot]" |
| 98 | + git config user.email "github-actions[bot]@users.noreply.github.com" |
| 99 | + git add typescript/package.json modelcontextprotocol/package.json python/pyproject.toml |
| 100 | + git commit -m "chore: version bump to v${{ steps.bump_npm.outputs.version }} [skip ci]" || echo "No changes to commit" |
| 101 | + git tag v${{ steps.bump_npm.outputs.version }} |
| 102 | + git push origin main --tags |
| 103 | + env: |
| 104 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
115 | 105 |
|
116 | 106 | # ---- Build & Publish npm (TypeScript) ---- |
117 | 107 | - name: Build and publish npm (TypeScript) |
|
0 commit comments