Skip to content

Commit

Permalink
Adapt to PyPI 2FA
Browse files Browse the repository at this point in the history
  • Loading branch information
wjsi committed Nov 11, 2023
1 parent 812f214 commit e9e5df3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/pypi-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,27 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD_VERBOSITY: "1"
CIBW_BEFORE_BUILD: pip install -r requirements-wheel.txt
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_SKIP: pp* *-musllinux* *i686 cp35-manylinux_aarch64 cp36-manylinux_aarch64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014

- name: Build wheels (Python 3.10)
uses: pypa/cibuildwheel@v2.3.1
- name: "Build wheels (Python >= 3.10)"
uses: pypa/cibuildwheel@v2.14.1
env:
CIBW_BEFORE_BUILD: pip install -r requirements-wheel.txt
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_SKIP: pp* *-musllinux* *i686 cp36-* cp37-* cp38-* cp39-*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014

- name: Install Python
uses: actions/setup-python@v4
if: ${{ matrix.os == 'macos-latest'}}
with:
python-version: '3.7'

- name: Build source
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'auto'}}
run: |
Expand All @@ -56,7 +61,8 @@ jobs:
- name: Release to pypi
shell: bash
env:
PYPI_PWD: ${{ secrets.PYPI_PASSWORD }}
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
if [[ "$GITHUB_REPOSITORY" == "aliyun/aliyun-odps-python-sdk" ]]; then
PYPI_REPO="https://upload.pypi.org/legacy/"
Expand All @@ -68,8 +74,6 @@ jobs:
echo " pypi" >> ~/.pypirc
echo "[pypi]" >> ~/.pypirc
echo "repository=$PYPI_REPO" >> ~/.pypirc
echo "username=pyodps" >> ~/.pypirc
echo "password=$PYPI_PWD" >> ~/.pypirc
python -m pip install twine
python -m twine upload -r pypi --skip-existing wheelhouse/*
Expand Down

0 comments on commit e9e5df3

Please sign in to comment.