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 Python distributions to PyPI
2+
3+ on : push
4+ jobs :
5+ build-n-publish :
6+ name : Build and publish Python distributions to PyPI
7+ runs-on : ubuntu-latest
8+ # We only execute this step if the commit is tagged, i.e., this is a release
9+ # if: startsWith(github.ref, 'refs/tags')
10+ steps :
11+ - name : Checkout code
12+ uses : actions/checkout@master
13+ - name : Set up Python 3.12
14+ uses : actions/setup-python@master
15+ with :
16+ python-version : " 3.12"
17+ - name : Install pypa/build
18+ run : >-
19+ python3.12 -m
20+ pip install
21+ build
22+ --user
23+ - name : Build a binary wheel and a source tarball
24+ run : >-
25+ python3.12 -m
26+ build
27+ --sdist
28+ --wheel
29+ --outdir dist/
30+ .
31+ - name : Publish distribution to Test PyPI
32+ uses : pypa/gh-action-pypi-publish@release/v1.14
33+ with :
34+ repository_url : https://test.pypi.org/legacy/
35+ # - name: Publish distribution to PyPI
36+ # uses: pypa/gh-action-pypi-publish@master
You can’t perform that action at this time.
0 commit comments