Skip to content

Commit 8f9481c

Browse files
authored
Merge pull request #50 from tishun/topic/tishu/pypi-release-improvements
Improvements to the release flow and documentation
2 parents 000ae45 + 9d52dac commit 8f9481c

File tree

3 files changed

+135
-7
lines changed

3 files changed

+135
-7
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,48 @@ jobs:
162162
- name: ⚙️ Set up Python
163163
run: uv python install 3.12
164164

165-
- name: ⚙️ Build package
165+
- name: ⚙️ Override version in pyproject.toml
166+
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.version) || github.event_name == 'release'
166167
run: |
167-
uv build --sdist --wheel
168+
# Determine the target version
169+
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
170+
TARGET_VERSION="${{ github.event.inputs.version }}"
171+
echo "Overriding version from manual trigger: $TARGET_VERSION"
172+
elif [[ "${{ github.event_name }}" == "release" ]]; then
173+
RELEASE_TAG="${{ github.event.release.tag_name }}"
174+
TARGET_VERSION=$(echo "$RELEASE_TAG" | sed 's/^v//')
175+
echo "Overriding version from release tag: $TARGET_VERSION (tag: $RELEASE_TAG)"
176+
fi
177+
178+
# Get current version for comparison
179+
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
180+
echo "Current version in pyproject.toml: $CURRENT_VERSION"
181+
182+
# Check if override is needed
183+
if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then
184+
echo "Version already matches target: $TARGET_VERSION"
185+
else
186+
echo "Version override needed: $CURRENT_VERSION → $TARGET_VERSION"
187+
188+
# Update version in pyproject.toml
189+
sed -i "s/^version = \".*\"/version = \"$TARGET_VERSION\"/" pyproject.toml
190+
191+
# Verify the change
192+
NEW_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
193+
echo "Updated version in pyproject.toml: $NEW_VERSION"
194+
195+
# Validate the change was successful
196+
if [[ "$NEW_VERSION" != "$TARGET_VERSION" ]]; then
197+
echo "Version override failed! Expected: $TARGET_VERSION, Got: $NEW_VERSION"
198+
exit 1
199+
fi
200+
201+
echo "Version successfully changed: $CURRENT_VERSION → $NEW_VERSION"
202+
fi
203+
204+
- name: ⚙️ Build package
205+
run: |
206+
uv build --sdist --wheel
168207
169208
- name: ⚙️ Check package
170209
run: |

.github/workflows/stale-issues.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: "Stale Issue Management"
2+
on:
3+
schedule:
4+
# Run daily at midnight UTC
5+
- cron: "0 0 * * *"
6+
workflow_dispatch: # Allow manual triggering
7+
env:
8+
# Default stale policy timeframes
9+
DAYS_BEFORE_STALE: 365
10+
DAYS_BEFORE_CLOSE: 30
11+
# Accelerated timeline for needs-information issues
12+
NEEDS_INFO_DAYS_BEFORE_STALE: 30
13+
NEEDS_INFO_DAYS_BEFORE_CLOSE: 7
14+
jobs:
15+
stale:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/stale@v9
19+
with:
20+
repo-token: ${{ secrets.GITHUB_TOKEN }}
21+
dry-run: true
22+
# Default stale policy
23+
days-before-stale: ${{ env.DAYS_BEFORE_STALE }}
24+
days-before-close: ${{ env.DAYS_BEFORE_CLOSE }}
25+
# Explicit stale label configuration
26+
stale-issue-label: "stale"
27+
stale-pr-label: "stale"
28+
stale-issue-message: |
29+
This issue has been automatically marked as stale due to inactivity.
30+
It will be closed in 30 days if no further activity occurs.
31+
If you believe this issue is still relevant, please add a comment to keep it open.
32+
close-issue-message: |
33+
This issue has been automatically closed due to inactivity.
34+
If you believe this issue is still relevant, please reopen it or create a new issue with updated information.
35+
# Exclude needs-information issues from this job
36+
exempt-issue-labels: 'no-stale,needs-information'
37+
# Remove stale label when issue/PR becomes active again
38+
remove-stale-when-updated: true
39+
# Apply to pull requests with same timeline
40+
days-before-pr-stale: ${{ env.DAYS_BEFORE_STALE }}
41+
days-before-pr-close: ${{ env.DAYS_BEFORE_CLOSE }}
42+
stale-pr-message: |
43+
This pull request has been automatically marked as stale due to inactivity.
44+
It will be closed in 30 days if no further activity occurs.
45+
close-pr-message: |
46+
This pull request has been automatically closed due to inactivity.
47+
If you would like to continue this work, please reopen the PR or create a new one.
48+
# Only exclude no-stale PRs (needs-information PRs follow standard timeline)
49+
exempt-pr-labels: 'no-stale'
50+
# Separate job for needs-information issues ONLY with accelerated timeline
51+
stale-needs-info:
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/stale@v9
55+
with:
56+
repo-token: ${{ secrets.GITHUB_TOKEN }}
57+
dry-run: true
58+
# Accelerated timeline for needs-information
59+
days-before-stale: ${{ env.NEEDS_INFO_DAYS_BEFORE_STALE }}
60+
days-before-close: ${{ env.NEEDS_INFO_DAYS_BEFORE_CLOSE }}
61+
# Explicit stale label configuration
62+
stale-issue-label: "stale"
63+
# Only target ISSUES with needs-information label (not PRs)
64+
only-issue-labels: 'needs-information'
65+
stale-issue-message: |
66+
This issue has been marked as stale because it requires additional information
67+
that has not been provided for 30 days. It will be closed in 7 days if the
68+
requested information is not provided.
69+
close-issue-message: |
70+
This issue has been closed because the requested information was not provided within the specified timeframe.
71+
If you can provide the missing information, please reopen this issue or create a new one.
72+
# Disable PR processing for this job
73+
days-before-pr-stale: -1
74+
days-before-pr-close: -1
75+
# Remove stale label when issue becomes active again
76+
remove-stale-when-updated: true

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Redis MCP Server
22
[![Integration](https://github.com/redis/mcp-redis/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/redis/mcp-redis/actions/workflows/ci.yml)
3-
[![Python Version](https://img.shields.io/badge/python-3.13%2B-blue)](https://www.python.org/downloads/)
3+
[![PyPI - Version](https://img.shields.io/pypi/v/redis-mcp-server)](https://pypi.org/project/redis-mcp-server/)
4+
[![Python Version](https://img.shields.io/badge/python-3.13%2B-blue&logo=redis)](https://www.python.org/downloads/)
45
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)
56
[![smithery badge](https://smithery.ai/badge/@redis/mcp-redis)](https://smithery.ai/server/@redis/mcp-redis)
67
[![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/70102150-efe0-4705-9f7d-87980109a279)
7-
![Docker Image Version](https://img.shields.io/docker/v/mcp/redis?sort=semver&logo=docker&label=Docker)
8+
[![Docker Image Version](https://img.shields.io/docker/v/mcp/redis?sort=semver&logo=docker&label=Docker)](https://hub.docker.com/r/mcp/redis)
9+
[![codecov](https://codecov.io/gh/redis/mcp-redis/branch/master/graph/badge.svg?token=yenl5fzxxr)](https://codecov.io/gh/redis/mcp-redis)
810

911

1012
[![Discord](https://img.shields.io/discord/697882427875393627.svg?style=social&logo=discord)](https://discord.gg/redis)
@@ -52,6 +54,7 @@ The Redis MCP Server is a **natural language interface** designed for agentic ap
5254
- **Full Redis Support**: Handles **hashes, lists, sets, sorted sets, streams**, and more.
5355
- **Search & Filtering**: Supports efficient data retrieval and searching in Redis.
5456
- **Scalable & Lightweight**: Designed for **high-performance** data operations.
57+
- The Redis MCP Server supports the `stdio` [transport](https://modelcontextprotocol.io/docs/concepts/transports#standard-input%2Foutput-stdio). Support to the `stremable-http` transport will be added in the future.
5558

5659
## Tools
5760

@@ -73,11 +76,21 @@ Additional tools.
7376

7477
## Installation
7578

76-
The Redis MCP Server supports the `stdio` [transport](https://modelcontextprotocol.io/docs/concepts/transports#standard-input%2Foutput-stdio). Support to the `stremable-http` transport will be added in the future.
79+
The Redis MCP Server is available as a Python package, and can be installed from PyPI.
7780

78-
> No PyPi package is available at the moment.
81+
```sh
82+
pip install redis-mcp-server
83+
```
84+
85+
Alternatively you can use `uv` to install the package and its dependencies.
86+
87+
```sh
88+
uv python install 3.13
89+
uv sync
90+
uv run redis-mcp-server --url redis://localhost:6379/0
91+
```
7992

80-
### Quick Start with uvx
93+
### Running the latest bits
8194

8295
The easiest way to use the Redis MCP Server is with `uvx`, which allows you to run it directly from GitHub (from a branch, or use a tagged release). It is recommended to use a tagged release, the `main` branch is under active development and may contain breaking changes. As an example, you can execute the following command to run the `0.2.0` release:
8396

0 commit comments

Comments
 (0)