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 to PyPI
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - main
8+ release :
9+ types :
10+ - published
11+
12+ jobs :
13+ packages :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v3
20+ with :
21+ python-version : " 3.x"
22+
23+ - name : Get tags
24+ run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
25+ shell : bash
26+
27+ - name : Install build tools
28+ run : |
29+ python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine
30+
31+ shell : bash
32+
33+ - name : Build binary wheel
34+ run : python -m build --sdist --wheel . --outdir dist
35+
36+ - name : CheckFiles
37+ run : |
38+ ls dist
39+ shell : bash
40+
41+ - name : Test wheels
42+ run : |
43+ cd dist && python -m pip install ctd*.whl
44+ python -m twine check *
45+ shell : bash
46+
47+ - name : Publish a Python distribution to PyPI
48+ if : success() && github.event_name == 'release'
49+ uses : pypa/gh-action-pypi-publish@release/v1
50+ with :
51+ user : __token__
52+ password : ${{ secrets.PYPI_PASSWORD }}
You can’t perform that action at this time.
0 commit comments