Check distribution build

pull/685/head
Nicco Kunzmann 2024-07-03 15:21:00 +01:00
rodzic 2f5a0a5e21
commit 8ec072b9c9
2 zmienionych plików z 22 dodań i 2 usunięć

Wyświetl plik

@ -71,11 +71,29 @@ jobs:
parallel-finished: true
format: cobertura
test-distribution:
name: Check built package
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel twine
- name: Build distribution files
run: python setup.py bdist_wheel sdist
- name: Check distribution files
run: twine check dist/*
deploy-tag-to-pypi:
# only deploy on tags, see https://stackoverflow.com/a/58478262/1320237
if: startsWith(github.ref, 'refs/tags/v')
needs:
- run-tests
- test-distribution
runs-on: ubuntu-latest
# This environment stores the TWINE_USERNAME and TWINE_PASSWORD
# see https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
@ -92,7 +110,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@ -133,7 +151,8 @@ jobs:
# only deploy on tags, see https://stackoverflow.com/a/58478262/1320237
if: startsWith(github.ref, 'refs/tags/v')
needs:
- run-tests
- run-tests
- test-distribution
runs-on: ubuntu-latest
environment:
name: github-release

Wyświetl plik

@ -19,6 +19,7 @@ Minor changes:
- Remove 4.x badge
- Update list of ``tox`` environments
- Use Coveralls' GitHub Action
- Check distribution in CI
Breaking changes: