File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Packaging
33on : [push, pull_request]
44
55jobs :
6- packaging :
6+ build :
77 if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
88 runs-on : ubuntu-22.04
99 steps :
1919 python -m pip install tox
2020 - name : Build package
2121 run : |
22- tox -e packaging
22+ tox -e build
23+ - name : Upload package
24+ uses : actions/upload-artifact@v4
25+ with :
26+ name : python-package-distributions
27+ path : dist/
28+ publish :
29+ if : startsWith(github.ref, 'refs/tags/')
30+ runs-on : ubuntu-22.04
31+ needs : build
32+ environment :
33+ name : pypi
34+ url : https://pypi.org/project/loguru/
35+ permissions :
36+ id-token : write
37+ steps :
38+ - name : Download package
39+ uses : actions/download-artifact@v4
40+ with :
41+ name : python-package-distributions
42+ path : dist/
43+ - name : Publish package
44+ uses : pypa/gh-action-pypi-publish@release/v1
Load diff This file was deleted.
Original file line number Diff line number Diff line change 11[tox]
2- envlist = lint, tests, docs, packaging
2+ envlist = lint, tests, docs, build
33isolated_build = True
44
55[testenv]
@@ -24,17 +24,8 @@ description = Build the HTML documentation.
2424commands =
2525 sphinx-build -a -b html -W --keep-going docs/ docs/build
2626
27- [testenv:packaging ]
27+ [testenv:build ]
2828description = Build the Python package.
2929commands =
3030 pyproject-build .
3131 twine check --strict dist/*
32-
33- [testenv:release]
34- description = Publish a new release on PyPI.
35- passenv =
36- TWINE_USERNAME
37- TWINE_PASSWORD
38- commands =
39- {[testenv:packaging]commands}
40- twine upload dist/* --disable-progress-bar --verbose
You can’t perform that action at this time.
0 commit comments