Skip to content

Commit

Permalink
Switch to pypa/gh-action-pypi-publish.
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR committed May 6, 2024
1 parent bb47366 commit 6ee6ece
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
- python-version: 3.12
env:
TOXENV: pylint
- python-version: 3.12
env:
TOXENV: twinecheck

steps:
- uses: actions/checkout@v4
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
with:
python-version: 3.12

- name: Publish to PyPI
- name: Build
run: |
pip install --upgrade pip
pip install --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
twine upload dist/*
pip install --upgrade build twine
python -m build
- name: Publish to PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_TOKEN }}
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,12 @@ deps =
pylint==3.1.0
commands =
pylint {posargs:itemadapter}

[testenv:twinecheck]
basepython = python3
deps =
twine==5.0.0
build==1.2.1
commands =
python -m build --sdist
twine check dist/*

0 comments on commit 6ee6ece

Please sign in to comment.