Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
b8c9742
Add CI/CD workflows for testing, version bumping, and PyPI publishing…
toreleon Apr 12, 2025
3b2e191
Enhance CI workflow by installing all extras with Poetry
toreleon Apr 12, 2025
f0288e7
Refactor CI workflow to include version bumping and streamline packag…
toreleon Apr 12, 2025
bb1850a
Merge branch 'master' of github.com:Cognitive-Stack/mcphub into torel…
toreleon Apr 12, 2025
d5230a7
Update README to clarify MCPHub installation options with framework-s…
toreleon Apr 12, 2025
613d45f
Restrict pull request triggers to the release branch only
toreleon Apr 12, 2025
dd7e9fc
Update CI workflow to enable fail-fast strategy and restrict Python v…
toreleon Apr 12, 2025
e8f4952
Merge branch 'master' of github.com:Cognitive-Stack/mcphub into torel…
toreleon Apr 12, 2025
6a4995b
Merge branch 'master' of github.com:Cognitive-Stack/mcphub into torel…
toreleon Apr 12, 2025
484b58c
Refactor CI workflows to remove version bumping from CI and add taggi…
toreleon Apr 12, 2025
4df7a7e
Merge branch 'master' of github.com:Cognitive-Stack/mcphub into torel…
toreleon Apr 12, 2025
1e7e851
Refactor CI workflows to integrate version bumping and ensure proper …
toreleon Apr 12, 2025
3e68107
Merge branch 'master' of github.com:Cognitive-Stack/mcphub into torel…
toreleon Apr 12, 2025
53b7b27
Bump version to 0.1.6 in pyproject.toml
toreleon Apr 12, 2025
0bd0f2a
Refactor CI workflows: remove version-bump workflow and integrate ver…
toreleon Apr 12, 2025
bb799bf
Merge branch 'master' of github.com:Cognitive-Stack/mcphub into torel…
toreleon Apr 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 50 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,16 @@ jobs:
- name: Run tests
run: |
poetry run pytest tests/ -v

# Call the version-bump workflow to bump the version before publishing
version-bump:
needs: test
uses: ./.github/workflows/version-bump.yml
# Only run on release branch when push (merge)
if: github.event_name == 'push' && github.ref == 'refs/heads/release'

publish:
needs: version-bump
needs: test
runs-on: ubuntu-latest
# Only run on release branch when push (merge)
if: github.event_name == 'push' && github.ref == 'refs/heads/release'

steps:
- uses: actions/checkout@v3
with:
ref: 'refs/heads/release'
fetch-depth: 0

- name: Set up Python
Expand All @@ -64,11 +56,57 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install poetry tomlkit

- name: Extract version from pyproject.toml
id: get-version
run: |
# Python script to extract current version
python - << 'EOF'
import tomlkit
import os

# Read current version from pyproject.toml
with open('pyproject.toml', 'r') as f:
pyproject = tomlkit.parse(f.read())

version = pyproject['project']['version']
print(f"Current version: {version}")

# Save the version to environment variables for later steps
with open(os.environ['GITHUB_ENV'], 'a') as f:
f.write(f"PACKAGE_VERSION={version}\n")

# Set output for the workflow
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
f.write(f"version={version}\n")
EOF

- name: Check if tag exists
id: check-tag
run: |
TAG="v${PACKAGE_VERSION}"
if git rev-parse $TAG >/dev/null 2>&1; then
echo "Tag $TAG already exists"
echo "tag_exists=true" >> $GITHUB_OUTPUT
else
echo "Tag $TAG does not exist"
echo "tag_exists=false" >> $GITHUB_OUTPUT
fi

- name: Configure Git
if: steps.check-tag.outputs.tag_exists == 'false'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

- name: Fetch latest changes with updated version
- name: Create and push tag
if: steps.check-tag.outputs.tag_exists == 'false'
run: |
git pull origin release # Make sure we have the latest version after bump
# Create a new tag with the version from pyproject.toml
git tag -a "v${PACKAGE_VERSION}" -m "Release version ${PACKAGE_VERSION}"
# Push the tag to the remote repository
git push origin "v${PACKAGE_VERSION}"

- name: Build and publish
env:
Expand Down
90 changes: 0 additions & 90 deletions .github/workflows/version-bump.yml

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "mcphub"
version = "0.1.6"
version = "0.1.7"
description = "A Python package for managing and integrating Model Context Protocol (MCP) servers with AI frameworks like OpenAI Agents, LangChain, and Autogen"
readme = "README.md"
authors = [
Expand Down