File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Publish Python package
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - " v*"
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ publish :
14+ runs-on : ubuntu-latest
15+ environment : pypi
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Python
22+ uses : actions/setup-python@v5
23+ with :
24+ python-version : " 3.12"
25+
26+ - name : Install build tools
27+ run : |
28+ python -m pip install --upgrade pip
29+ python -m pip install build twine
30+
31+ - name : Build package
32+ run : python -m build
33+
34+ - name : Validate distribution metadata
35+ run : python -m twine check dist/*
36+
37+ - name : Publish package to PyPI
38+ env :
39+ TWINE_USERNAME : __token__
40+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
41+ run : python -m twine upload dist/* --verbose
You can’t perform that action at this time.
0 commit comments