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 : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - " v*" # Push on version tags like v1.0, v1.0.0, etc.
9+ workflow_dispatch : # Allows manual triggering
10+
11+ jobs :
12+ build-and-publish :
13+ name : Build and publish Python distributions to PyPI
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read
17+ id-token : write # Required for trusted publishing
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Set up Python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : " 3.8"
27+
28+ - name : Install Poetry
29+ uses : snok/install-poetry@v1
30+ with :
31+ virtualenvs-create : true
32+ virtualenvs-in-project : true
33+
34+ - name : Install dependencies
35+ run : poetry install --no-interaction --no-root
36+
37+ - name : Build package
38+ run : poetry build
39+
40+ - name : Publish package to PyPI
41+ if : startsWith(github.ref, 'refs/tags/v')
42+ uses : pypa/gh-action-pypi-publish@release/v1
43+ with :
44+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments