File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Python Package
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - ci/update-package-version-on-github-action # TODO: Remove this branch after testing
8+ workflow_dispatch : # Allows manual triggering
9+
10+ jobs :
11+ publish :
12+ runs-on : ubuntu-latest
13+ environment : release
14+ permissions :
15+ id-token : write # OIDC authentication with PyPI
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v4
22+ with :
23+ python-version : ' 3.11'
24+
25+ - name : Install dependencies
26+ run : |
27+ python -m pip install --upgrade pip
28+ pip install build twine
29+ pip install -r requirements.txt
30+
31+ - name : Build package
32+ run : python -m build
33+
34+ - name : Publish package to PyPI
35+ uses : pypa/gh-action-pypi-publish@release/v1
36+ with :
37+ password : ${{ secrets.PYPI_API_KEY }}
You can’t perform that action at this time.
0 commit comments