-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (64 loc) · 2.55 KB
/
python-release.yml
File metadata and controls
76 lines (64 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Python Release
on:
push:
tags:
- 'python-v*'
workflow_dispatch:
inputs:
version:
description: 'Python version to release (e.g., 1.6.0)'
required: true
type: string
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version from tag or input
id: version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
VERSION="${{ github.event.inputs.version }}"
TAG="python-v${VERSION}"
else
TAG="${{ github.ref_name }}"
VERSION="${TAG#python-v}"
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Get PyPI package info
id: pypi
run: |
PYPI_URL="https://pypi.org/project/modelcontextprotocol/${{ steps.version.outputs.version }}/"
STATS_URL="https://pypistats.org/packages/modelcontextprotocol"
echo "pypi_url=${PYPI_URL}" >> $GITHUB_OUTPUT
echo "stats_url=${STATS_URL}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.tag }}
name: Python v${{ steps.version.outputs.version }}
body: |
# Python ModelContextProtocol v${{ steps.version.outputs.version }}
🐍 **Python package release for the Model Context Protocol**
## 📦 Installation
```bash
pip install modelcontextprotocol==${{ steps.version.outputs.version }}
```
## 🔗 Links
- 📦 **PyPI Package**: ${{ steps.pypi.outputs.pypi_url }}
- 📊 **Download Stats**: ${{ steps.pypi.outputs.stats_url }}
- 📚 **Python Docs**: https://modelcontextprotocol.io/docs/python
- 🐍 **Python Repository**: https://github.com/leanmcp/modelcontextprotocol#readme
## 🚀 What's New
Check the [Python repository changelog](https://github.com/leanmcp/modelcontextprotocol#readme) for detailed changes in this release.
---
*This release was automatically created from the Python package version.*
draft: false
prerelease: false
generate_release_notes: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}