File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python Package
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ jobs :
9+ build-and-publish :
10+ name : Build and Publish
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Python
18+ uses : actions/setup-python@v4
19+ with :
20+ python-version : " 3.10"
21+
22+ - name : Install Poetry
23+ run : |
24+ curl -sSL https://install.python-poetry.org | python3 -
25+ echo "export PATH=\"$HOME/.local/bin:$PATH\"" >> $GITHUB_ENV
26+
27+ - name : Install dependencies
28+ run : poetry install --no-interaction --no-ansi
29+
30+ - name : Build the package
31+ run : poetry build
32+
33+ - name : Configure Poetry for PyPI
34+ run : |
35+ poetry config pypi-token.pypi ${{ secrets.TWINE_API_TOKEN }}
36+
37+ - name : Publish to PyPI
38+ run : |
39+ poetry publish --no-interaction --no-ansi
You can’t perform that action at this time.
0 commit comments