Test build v4.47.0a3 #96
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publishing | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
jobs: | |
tests: | |
name: Run tests | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.13 | |
- run: pip install tox | |
- run: tox | |
env: | |
TOXENV: 3.13 | |
linters: | |
name: Run linters | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
toxenv: [flake8, pydocstyle, mypy, pylint] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.13 | |
- run: pip install tox | |
- run: tox | |
env: | |
TOXENV: ${{ matrix.toxenv }} | |
build-sdist: | |
name: Build source tarball | |
needs: [tests, linters] | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.13 | |
- run: | | |
python -m pip install --upgrade build | |
python -m build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-sdist | |
path: ./dist/* | |
build-wheels: | |
name: Build wheels | |
needs: [tests, linters] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2019, macos-14] | |
env: | |
CIBW_ENABLE: pypy | |
CIBW_ENVIRONMENT: >- | |
PIP_CONFIG_SETTINGS="build_ext=-j4" | |
DEPENDENCY_INJECTOR_LIMITED_API="1" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-x86-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |
test-publish: | |
name: Upload release to TestPyPI | |
needs: [build-sdist, build-wheels] | |
runs-on: ubuntu-latest | |
environment: test-pypi | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
publish: | |
name: Upload release to PyPI | |
needs: [build-sdist, build-wheels, test-publish] | |
runs-on: ubuntu-latest | |
environment: pypi | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
publish-docs: | |
name: Publish docs | |
needs: [publish] | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.13 | |
- run: pip install awscli | |
- run: pip install -r requirements-doc.txt | |
- run: pip install -e . | |
- run: (cd docs && make clean html) | |
- run: | | |
aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null | |
echo "Cache invalidation triggered" | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} |