python-dependency-injector/.github/workflows/publishing.yml
2021-01-26 08:58:27 -05:00

56 lines
1.5 KiB
YAML

name: Publishing
on:
push:
tags:
- '*'
jobs:
publish-source:
name: Publish source tarball
runs-on: ubuntu-latest
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: python setup.py sdist
- run: pip install twine
- run: twine upload dist/*
publish-wheels:
name: Publish Linux wheels (x64)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
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
- 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