Skip to content

Commit f9df9b0

Browse files
committed
chore: add GitHub Actions workflow for publishing to PyPI
1 parent 188377d commit f9df9b0

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish to PyPI
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
pypi-publish:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
# IMPORTANT: this permission is mandatory for trusted publishing
15+
id-token: write
16+
17+
# Dedicated environments with protections for publishing are strongly recommended.
18+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
19+
environment:
20+
name: pypi
21+
url: https://pypi.org/project/modelscope-mcp-server
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: "Install uv"
29+
uses: astral-sh/setup-uv@v6
30+
31+
- name: Build
32+
run: uv build
33+
34+
- name: Publish to PyPi
35+
run: uv publish -v dist/*

0 commit comments

Comments
 (0)