File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Lint and test
1+ name : Run linters and tests
22
33on :
44 push :
5+ pull_request :
56
67permissions :
78 pull-requests : read
Original file line number Diff line number Diff line change 1+ name : Upload Python Package
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Check out code
12+ uses : actions/checkout@v4
13+ - name : Set up Python
14+ uses : actions/setup-python@v4
15+ with :
16+ python-version : " 3.x"
17+ - name : Install dependencies
18+ run : |
19+ python -m pip install --upgrade pip
20+ pip install build twine
21+ - name : Update version number
22+ run : |
23+ sed -i 's/version = ".*"/version = "${{ github.ref_name }}"/' pyproject.toml
24+ - name : Build and publish
25+ env :
26+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
27+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
28+ run : |
29+ python -m build
30+ twine upload dist/*
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments