Skip to content

Commit

Permalink
Merge pull request #89 from dhellmann/fix-publish-workflow
Browse files Browse the repository at this point in the history
fix action-based package publishing
  • Loading branch information
dhellmann authored Dec 21, 2023
2 parents dfb573a + 4052c58 commit 51cc995
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pbr
pip install .[build]
- name: Build sdist and wheel
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Publish distribution to PyPI
# This condition prevents PRs from being published as part of
# the test job.
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ dependencies = [
"stevedore",
]

[project.optional-dependencies]
linter = [
"flake8",
]
build = [
"build",
"twine",
"check-python-versions",
]

# https://github.com/pypa/setuptools_scm/
[tool.setuptools_scm]
write_to = "virtualenvwrapper/version.py"
Expand Down
7 changes: 2 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ setenv =
FAIL_FAST = true

[testenv:style]
deps = flake8
deps = .[linter]
commands = flake8 virtualenvwrapper docs/source/conf.py

[testenv:zsh]
Expand All @@ -38,10 +38,7 @@ commands =
sphinx-build -W -j auto -b linkcheck -d docs/build/doctrees docs/source docs/build/linkcheck

[testenv:pkglint]
deps=
build
twine
check-python-versions
deps=.[build]
commands=
python -m build
twine check dist/*.tar.gz dist/*.whl
Expand Down

0 comments on commit 51cc995

Please sign in to comment.