Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
dbeb2d3
adds test pypi, might have to set repository-url,
webcoderz Jan 4, 2025
bd05ee5
add workflows dir and move gha
webcoderz Jan 4, 2025
0ab65ab
Merge branch 'master' of https://github.com/webcoderz/MCP-Bridge
webcoderz Jan 4, 2025
8e1178d
Merge pull request #29 from webcoderz/master
webcoderz Jan 4, 2025
646776b
Update release.yaml
webcoderz Jan 4, 2025
a06dca9
Update release.yaml
webcoderz Jan 4, 2025
d7acdd2
Update release.yaml
webcoderz Jan 4, 2025
413a940
Update release.yaml
webcoderz Jan 4, 2025
c63f2a5
update package build version gha
Jan 4, 2025
8927031
Update docker-bake.hcl
webcoderz Jan 4, 2025
39b74ad
update package build version gha
Jan 4, 2025
c5e6ce1
Update release.yaml
webcoderz Jan 4, 2025
c666620
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
26e2822
update package build version gha
Jan 4, 2025
611a29b
Update release.yaml
webcoderz Jan 4, 2025
c17bb87
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
9d32931
Update release.yaml
webcoderz Jan 4, 2025
0add294
update package build version gha
Jan 4, 2025
96394f4
remove pypi and use uv
webcoderz Jan 4, 2025
3d23e0c
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
42b858d
update package build version gha
Jan 4, 2025
d98fced
Update release.yaml
webcoderz Jan 4, 2025
619a582
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
3a68085
update package build version gha
Jan 4, 2025
8b451f5
remove tool uv
webcoderz Jan 4, 2025
37d08dc
update package build version gha
Jan 4, 2025
c99d9ca
adding copy for readme and the __init__ for version checking
webcoderz Jan 4, 2025
2ffb97e
update package build version gha
Jan 4, 2025
3e9c428
Update release.yaml
webcoderz Jan 4, 2025
8eb49c6
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
a774b9e
Update release.yaml
webcoderz Jan 4, 2025
b34d52c
fix dist path for signing
webcoderz Jan 4, 2025
1e26c7f
update package build version gha
Jan 4, 2025
e756345
fixing release action
webcoderz Jan 4, 2025
473214b
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
f0169c7
update package build version gha
Jan 4, 2025
51399a5
gh release create for only whl and tar
webcoderz Jan 4, 2025
69db6b4
update package build version gha
Jan 4, 2025
0e68734
adding generate notes
webcoderz Jan 4, 2025
3968d94
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
f4b627c
update package build version gha
Jan 4, 2025
60dff20
adding sigstore to release
webcoderz Jan 4, 2025
2ea4d76
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
27db92f
update package build version gha
Jan 4, 2025
ddd5424
setting back to main for PR
webcoderz Jan 4, 2025
40bd29c
Merge branch 'pr/28' of https://github.com/SecretiveShell/MCP-Bridge …
webcoderz Jan 4, 2025
2d0b9f0
resetting version
webcoderz Jan 4, 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
55 changes: 22 additions & 33 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
- major
- minor
- patch
- alpha
- beta
- rc
- rev
- post

jobs:

Expand All @@ -25,6 +30,7 @@ jobs:
new_tag: ${{ steps.set_var.outputs.new_tag }}
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -35,54 +41,32 @@ jobs:
run: >-
python3 -m
pip install
poetry
hatchling uv
--user
- name: update version tag in pyproject.toml
id: set_var
run: |
poetry version ${{ github.event.inputs.version_bump }}
echo "new_tag=$(poetry version --short)" >> $GITHUB_OUTPUT
run: |
hatchling version ${{ github.event.inputs.version_bump }}
echo "new_tag=$(hatchling version)" >> $GITHUB_OUTPUT
git config --global user.email "gha@github.com"
git config --global user.name "github robot"
git commit -am "update package build version gha"
git push origin main

- name: Build a binary wheel and a source tarball
run: poetry build
run: uv build && uv publish
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/MCP_Bridge # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
- build
runs-on: ubuntu-latest

Expand All @@ -96,13 +80,13 @@ jobs:
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
path: .
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
./*.tar.gz
./*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -111,7 +95,7 @@ jobs:
gh release create
'${{ needs.build.outputs.new_tag }}'
--repo '${{ github.repository }}'
--notes ""
--generate-notes
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -120,21 +104,26 @@ jobs:
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ needs.build.outputs.new_tag }}' dist/**
'${{ needs.build.outputs.new_tag }}' ./*.tar.gz ./*.whl ./*.tar.gz.sigstore.json ./*.whl.sigstore.json
--repo '${{ github.repository }}'

push-store-image:
permissions: write-all
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout code
uses: actions/checkout@v4
- name: 'Build images'
run: |
RELEASE=${{ needs.build.outputs.new_tag }} \
docker buildx bake mcp-bridge -f docker-bake.hcl --push


6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y --no-install-recommends nodejs

COPY pyproject.toml .

## FOR GHCR BUILD PIPELINE
COPY mcp_bridge/__init__.py mcp_bridge/__init__.py
COPY README.md README.md


RUN uv sync

COPY mcp_bridge mcp_bridge
Expand Down
4 changes: 2 additions & 2 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable "RELEASE" {
}

variable "REGISTRY" {
default = "ghcr.io/secretiveshell/mcp-bridge/"
default = "ghcr.io/secretiveshell/mcp-bridge"
}

group "default" {
Expand All @@ -14,7 +14,7 @@ group "default" {

target "mcp-bridge" {
dockerfile = "Dockerfile"
tags = ["${REGISTRY}${target.mcp-bridge.name}:${RELEASE}"]
tags = ["${REGISTRY}/${target.mcp-bridge.name}:${RELEASE}"]
context = "."
labels = {
"org.opencontainers.image.source" = "https://github.com/SecretiveShell/MCP-Bridge"
Expand Down
1 change: 1 addition & 0 deletions mcp_bridge/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.0.0'
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mcp-bridge"
version = "0.1.0"
dynamic = ["version"]
description = "A middleware to provide an openAI compatible endpoint that can call MCP tools."
readme = "README.md"
requires-python = ">=3.11"
Expand All @@ -26,3 +26,9 @@ dev = [
"mypy>=1.14.0",
"ruff>=0.8.4",
]
[build-system]
requires = [ "hatchling",]
build-backend = "hatchling.build"

[tool.hatch.version]
path = "mcp_bridge/__init__.py"
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.