File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,17 @@ name: Release
33on :
44 release :
55 types : [published]
6+ workflow_dispatch :
7+ inputs :
8+ skip_pypi :
9+ description : ' Skip PyPI publish (only publish to MCP Registry)'
10+ required : false
11+ default : ' false'
12+ type : boolean
13+ version :
14+ description : ' Version to publish (e.g., 1.1.0, required when skip_pypi is true)'
15+ required : false
16+ type : string
617
718jobs :
819 test :
8899 pypi-publish :
89100 name : Upload release to PyPI
90101 needs : build
102+ if : ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.skip_pypi != 'true') }}
91103 runs-on : ubuntu-latest
92104 environment :
93105 name : pypi
@@ -104,17 +116,23 @@ jobs:
104116
105117 mcp-registry-publish :
106118 name : Publish to MCP Registry
107- needs : pypi-publish
119+ needs : [build, pypi-publish]
120+ if : always() && needs.build.result == 'success' && (needs.pypi-publish.result == 'success' || needs.pypi-publish.result == 'skipped')
108121 runs-on : ubuntu-latest
109122 permissions :
110123 id-token : write
111124 contents : read
112125 steps :
113126 - uses : actions/checkout@v4
114127
115- - name : Get version from tag
128+ - name : Get version from tag or input
116129 id : get_version
117- run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
130+ run : |
131+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.version }}" ]; then
132+ echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
133+ else
134+ echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
135+ fi
118136
119137 - name : Update server.json version
120138 run : |
You can’t perform that action at this time.
0 commit comments