19
19
with :
20
20
egress-policy : audit
21
21
22
- - uses : actions/checkout@v4
22
+ - name : ⚙️ Checkout the project
23
+ uses : actions/checkout@v4
23
24
with :
24
- fetch-depth : 0 # Full history for hatch-vcs
25
+ fetch-depth : 0 # Full history for UV build
25
26
26
27
- name : ⚙️ Install uv
27
28
uses : astral-sh/setup-uv@v4
31
32
- name : ⚙️ Set up Python
32
33
run : uv python install 3.12
33
34
34
- - name : ⚙️ Get version from tag and hatch-vcs
35
- id : get-version
36
- run : |
37
- # Get version from git tag (remove 'v' prefix if present)
38
- TAG_VERSION="${GITHUB_REF#refs/tags/}"
39
- TAG_VERSION="${TAG_VERSION#v}"
40
- echo "tag-version=$TAG_VERSION" >> $GITHUB_OUTPUT
41
-
42
- # Get version from hatch-vcs (which uses git tags)
43
- SOURCE_VERSION=$(uv run python -m hatchling version)
44
- echo "version=$SOURCE_VERSION" >> $GITHUB_OUTPUT
45
-
46
- echo "Tag version: $TAG_VERSION"
47
- echo "Hatch-VCS version: $SOURCE_VERSION"
48
-
49
- - name : ⚙️ Validate version consistency
50
- run : |
51
- if [ "${{ steps.get-version.outputs.version }}" != "${{ steps.get-version.outputs.tag-version }}" ]; then
52
- echo "❌ Version mismatch!"
53
- echo "Tag version: ${{ steps.get-version.outputs.tag-version }}"
54
- echo "Hatch-VCS version: ${{ steps.get-version.outputs.version }}"
55
- echo "Please ensure the git tag is properly formatted for hatch-vcs."
56
- exit 1
57
- fi
58
- echo "✅ Version validation passed: ${{ steps.get-version.outputs.version }}"
59
-
60
35
security-scan :
61
36
runs-on : ubuntu-latest
62
37
needs : validate-release
66
41
with :
67
42
egress-policy : audit
68
43
69
- - uses : actions/checkout@v4
44
+ - name : ⚙️ Checkout the project
45
+ uses : actions/checkout@v4
70
46
with :
71
47
fetch-depth : 0
72
48
@@ -75,22 +51,15 @@ jobs:
75
51
with :
76
52
version : " latest"
77
53
78
- - name : ⚙️ Set up Python
79
- run : uv python install 3.12
80
-
81
- - name : ⚙️ Install dependencies
82
- run : uv sync --all-extras -- dev
54
+ - name : ⚙️ Set Python up and add dependencies
55
+ run : |
56
+ uv python install 3.12
57
+ uv sync --all-extras --dev
58
+ uv add --dev bandit safety
83
59
84
60
- name : ⚙️ Run security scan with bandit
85
61
run : |
86
- uv add --dev bandit[toml]
87
- uv run bandit -r src/ -f json -o bandit-report.json || true
88
62
uv run bandit -r src/
89
-
90
- - name : ⚙️ Run dependency vulnerability scan
91
- run : |
92
- uv add --dev safety
93
- uv run safety check --json --output safety-report.json || true
94
63
uv run safety check
95
64
96
65
test :
117
86
with :
118
87
egress-policy : audit
119
88
120
- - uses : actions/checkout@v4
89
+ - name : ⚙️ Checkout the project
90
+ uses : actions/checkout@v4
121
91
with :
122
92
fetch-depth : 0
123
93
@@ -127,10 +97,9 @@ jobs:
127
97
version : " latest"
128
98
129
99
- name : ⚙️ Set up Python ${{ matrix.python-version }}
130
- run : uv python install ${{ matrix.python-version }}
131
-
132
- - name : ⚙️ Install dependencies
133
- run : uv sync --all-extras --dev
100
+ run : |
101
+ uv python install ${{ matrix.python-version }}
102
+ uv sync --all-extras --dev
134
103
135
104
- name : ⚙️ Run tests
136
105
run : uv run pytest tests/ -v --tb=short
@@ -162,9 +131,10 @@ jobs:
162
131
with :
163
132
egress-policy : audit
164
133
165
- - uses : actions/checkout@v4
134
+ - name : ⚙️ Checkout the project
135
+ uses : actions/checkout@v4
166
136
with :
167
- fetch-depth : 0 # Full history for hatch-vcs
137
+ fetch-depth : 0 # Full history for UV build
168
138
169
139
- name : ⚙️ Install uv
170
140
uses : astral-sh/setup-uv@v4
@@ -201,59 +171,9 @@ jobs:
201
171
path : dist/
202
172
retention-days : 90
203
173
204
- create-github-release-assets :
205
- runs-on : ubuntu-latest
206
- needs : [validate-release, build-and-publish]
207
- permissions :
208
- contents : write # For uploading release assets
209
- steps :
210
- - name : ⚙️ Harden Runner
211
- uses : step-security/harden-runner@v2
212
- with :
213
- egress-policy : audit
214
-
215
- - uses : actions/checkout@v4
216
-
217
- - name : ⚙️ Download build artifacts
218
- uses : actions/download-artifact@v4
219
- with :
220
- name : dist-${{ needs.validate-release.outputs.version }}
221
- path : dist/
222
-
223
- - name : ⚙️ Upload release assets
224
- uses : softprops/action-gh-release@v2
225
- with :
226
- files : |
227
- dist/*.tar.gz
228
- dist/*.whl
229
- body : |
230
- ## 🚀 Redis MCP Server v${{ needs.validate-release.outputs.version }}
231
-
232
- This release has been automatically published to PyPI with security scanning and comprehensive testing.
233
-
234
- ### Installation
235
- ```bash
236
- pip install redis-mcp-server==${{ needs.validate-release.outputs.version }}
237
- ```
238
-
239
- ### Quick Start
240
- ```bash
241
- uvx redis-mcp-server --url redis://localhost:6379/0
242
- ```
243
-
244
- ### What's Changed
245
- See the commit history for detailed changes in this release.
246
-
247
- ### Verification
248
- - ✅ All tests passed across Python 3.10-3.13
249
- - ✅ Security scan completed
250
- - ✅ Package built and verified successfully
251
- - ✅ Published to PyPI with attestations
252
- - ✅ Version consistency validated
253
-
254
174
notify-success :
255
175
runs-on : ubuntu-latest
256
- needs : [validate-release, build-and-publish, create-github-release-assets ]
176
+ needs : [validate-release, build-and-publish]
257
177
if : success()
258
178
steps :
259
179
- name : ⚙️ Success notification
0 commit comments