python-dependency-injector/.github/workflows/publishing.yml

60 lines
1.6 KiB
YAML
Raw Normal View History

2021-01-26 16:21:33 +03:00
name: Publishing
2021-01-26 16:12:33 +03:00
on:
push:
tags:
2021-01-26 16:13:54 +03:00
- '*'
2021-01-26 16:12:33 +03:00
jobs:
publish-source:
name: Publish source tarball
runs-on: ubuntu-latest
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
2021-01-26 16:26:23 +03:00
TWINE_REPOSITORY: testpypi
2021-01-26 16:12:33 +03:00
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: python setup.py sdist
- run: pip install twine
2021-01-26 16:26:23 +03:00
- run: twine upload dist/*
publish-wheels:
2021-01-26 16:26:23 +03:00
name: Publish Linux wheels (x64)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
2021-01-26 16:26:23 +03:00
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_REPOSITORY: testpypi
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip install cibuildwheel==1.8.0
2021-01-26 17:05:40 +03:00
- name: Install Visual C++ for Python 2.7 on Windows
if: runner.os == 'Windows'
run: |
choco install vcpython27 -f -y
2021-01-26 16:26:23 +03:00
- run: cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
# - 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