mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-02-06 22:50:52 +03:00
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
name: Publishing
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
|
|
build-sdist:
|
|
name: Build source tarball
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
- run: python setup.py sdist
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: ./dist/*
|
|
|
|
build-wheels:
|
|
name: Build wheels
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
- run: pip install cibuildwheel==1.8.0
|
|
- name: Install Visual C++ for Python 2.7 on Windows
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
choco install vcpython27 -f -y
|
|
- run: cibuildwheel --output-dir wheelhouse
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: ./wheelhouse/*.whl
|
|
|
|
upload-to-pypi:
|
|
name: Publish on PyPI
|
|
needs: [build-sdist, build-wheels]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: artifact
|
|
path: dist
|
|
- uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
repository_url: https://test.pypi.org/legacy/
|
|
|
|
# - services: docker
|
|
# arch: arm64
|
|
# if: tag IS present
|
|
# env: TWINE_USERNAME=__token__
|
|
# install: python3 -m pip install cibuildwheel==1.6.3
|
|
# script: python3 -m cibuildwheel --output-dir wheelhouse
|
|
# after_success:
|
|
# - python3 -m pip install --upgrade --upgrade-strategy eager twine
|
|
# - python3 -m twine upload wheelhouse/*.whl
|