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 : Publish StepDistanceCalculator to PyPI
2+
3+ on :
4+ release :
5+ types : [published]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build-and-publish :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ id-token : write # Mandatory for PyPI Trusted Publishing (OIDC)
13+ contents : read
14+
15+ steps :
16+ - name : Checkout Code
17+ uses : actions/checkout@v4
18+
19+ - name : Set up Python
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version : " 3.11"
23+
24+ - name : Install Build Dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install build twine
28+
29+ - name : Build Package
30+ run : |
31+ python -m build
32+
33+ - name : Check Distribution
34+ run : |
35+ python -m twine check dist/*
36+
37+ - name : Publish to PyPI
38+ uses : pypa/gh-action-pypi-publish@release/v1
39+ with :
40+ password : ${{ secrets.PYPI_API_TOKEN }}
41+ skip-existing : true
You can’t perform that action at this time.
0 commit comments