build(deps): bump coverage from 7.4.0 to 7.4.1 (#686) #1415
This file contains 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: Build and upload to PyPI | |
on: | |
push: | |
tags: | |
- '**' | |
branches-ignore: | |
- "dependabot/**" | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- uses: pre-commit/[email protected] | |
build_wheels: | |
name: Build ${{ matrix.archs }} ${{ matrix.build }} wheels on ${{ matrix.os }} | |
needs: [lint] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
archs: ["x86_64, i686", "aarch64", "ppc64le", "s390x"] | |
build: ["manylinux", "musllinux"] | |
include: | |
- os: windows-2019 | |
archs: "AMD64" | |
- os: windows-2019 | |
archs: "x86" | |
- os: windows-2019 | |
archs: "ARM64" | |
- os: macos-11 | |
archs: "x86_64, arm64" | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
if: runner.os == 'Linux' | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_ARCHS: "${{ matrix.archs }}" | |
CIBW_BUILD: "${{ matrix.build && '*-' || ''}}${{ matrix.build }}*" | |
CIBW_PRERELEASE_PYTHONS: "${{ !startsWith(github.ref, 'refs/tags/v') }}" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "cibw-wheels ${{ matrix.build || matrix.os }} ${{ matrix.archs }}" | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
needs: [lint] | |
runs-on: ubuntu-22.04 | |
env: | |
CIBUILDWHEEL: 1 # make C extension mandatory | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: "3.11" | |
- name: Install | |
run: python -m pip install ${{ github.workspace }}/dist/pybase64*.tar.gz | |
working-directory: "${{ runner.temp }}" | |
- name: Test | |
run: | | |
python -m pip install -r requirements-test.txt | |
pytest | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-sdist | |
path: dist/*.tar.gz | |
upload_test_pypi: | |
name: Upload to Test PyPI | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-22.04 | |
if: github.event_name == 'push' && github.repository == 'mayeut/pybase64' | |
environment: | |
name: test-pypi | |
url: https://test.pypi.org/p/pybase64 | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
# unpacks all CIBW artifacts into dist/ | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- name: Upload to Test PyPI | |
uses: pypa/[email protected] | |
with: | |
skip-existing: true | |
repository-url: https://test.pypi.org/legacy/ | |
upload_pypi: | |
name: Upload to PyPI | |
needs: [upload_test_pypi] | |
runs-on: ubuntu-22.04 | |
if: github.event_name == 'push' && github.repository == 'mayeut/pybase64' && startsWith(github.ref, 'refs/tags/v') | |
environment: | |
name: pypi | |
url: https://pypi.org/p/pybase64 | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
# unpacks all CIBW artifacts into dist/ | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- name: Upload to PyPI | |
uses: pypa/[email protected] | |
with: | |
skip-existing: true |