Skip to content

Commit

Permalink
Fix release workflow with modern boilerplate
Browse files Browse the repository at this point in the history
- Use PyPA `build` instead of `wheel`
- Use pypa/gh-action-pypi-publish action instead of Twine
- Upgrade checkout and setup-python actions
  • Loading branch information
n1ngu committed Feb 8, 2022
1 parent 03374fe commit 2904a92
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install twine and wheel
run: |
python3 -m pip install --upgrade pip twine wheel
- name: Prepare dist file
run: python3 setup.py bdist_wheel
- name: Publish dist on PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: python3 -m twine upload --non-interactive dist/*
- uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"

- name: Install PyPA build
run: python3 -m pip install build

- name: Prepare distribution
run: python3 -m build .

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TWINE_PASSWORD }}

0 comments on commit 2904a92

Please sign in to comment.