File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python Packages To Pypi
2+ on :
3+ workflow_dispatch :
4+ release :
5+ types : [created]
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-22.04
9+ steps :
10+ - uses : actions/checkout@v3
11+ - name : Set up Python
12+ uses : actions/setup-python@v3
13+ with :
14+ python-version : ' 3.10'
15+ - name : Install dependencies
16+ run : |
17+ python -m pip install --upgrade pip
18+ pip install setuptools wheel twine
19+ - name : Build packages
20+ run : |
21+ for each in $(find "${GITHUB_WORKSPACE}" -maxdepth 1 -mindepth 1 -type d -name "*sdk*")
22+ do
23+ cd "${each}" || exit 1
24+ python setup.py bdist_wheel
25+ cp dist/*.whl "${GITHUB_WORKSPACE}"
26+ done
27+ shell : bash
28+ - name : Publish packages
29+ run : |
30+ echo -e "[pypi]\nusername = __token__\npassword = ${PYPI_API_TOKEN}" >> "${HOME}/.pypirc"
31+ cd "${GITHUB_WORKSPACE}" || exit 1
32+ twine upload --repository pypi ./*.whl --skip-existing --verbose
33+ env :
34+ PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments