Skip to content

Commit 2436dab

Browse files
authored
Update publish.yml
1 parent 2fed013 commit 2436dab

1 file changed

Lines changed: 9 additions & 19 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
env:
2222
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2323
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
24-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2524

2625
steps:
2726
- uses: actions/checkout@v4
@@ -92,26 +91,17 @@ jobs:
9291
sed -i "s/__version__ = .*/__version__ = \"$VERSION\"/" python/__init__.py
9392
fi
9493
95-
# ---- Commit & Tag version bump ----
94+
# Commit, tag, and push
9695
- name: Commit and tag version bump
9796
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 }}
115105

116106
# ---- Build & Publish npm (TypeScript) ----
117107
- name: Build and publish npm (TypeScript)

0 commit comments

Comments
 (0)