File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish SDK to PyPI
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version :
7+ description : ' Version to publish (leave empty to use pyproject.toml version)'
8+ required : false
9+ type : string
10+
11+ jobs :
12+ build-and-publish :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ id-token : write
16+ contents : read
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Python
22+ uses : actions/setup-python@v5
23+ with :
24+ python-version : ' 3.10'
25+
26+ - name : Install build dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install build
30+
31+ - name : Update version if specified
32+ if : ${{ inputs.version != '' }}
33+ working-directory : sdk
34+ run : |
35+ sed -i "s/^version = .*/version = \"${{ inputs.version }}\"/" pyproject.toml
36+
37+ - name : Build package
38+ working-directory : sdk
39+ run : python -m build
40+
41+ - name : Publish to PyPI
42+ uses : pypa/gh-action-pypi-publish@release/v1
43+ with :
44+ packages-dir : sdk/dist/
You can’t perform that action at this time.
0 commit comments