Use build-and-inspect-python-package action (#10722)

This uses https://github.com/hynek/build-and-inspect-python-package to ensure our package is correct, both during testing and deploy,
This commit is contained in:
Bruno Oliveira
2023-02-12 21:37:40 -03:00
committed by GitHub
parent 7a829cb57d
commit 27165cf8db
3 changed files with 34 additions and 12 deletions

View File

@@ -28,25 +28,30 @@ jobs:
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v1.5
- name: Download Package
uses: actions/download-artifact@v3
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade build tox
- name: Build package
run: |
python -m build
name: Packages
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_token }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install --upgrade tox
- name: Publish GitHub release notes
env:
GH_RELEASE_NOTES_TOKEN: ${{ github.token }}