CI: Upload packages to test.pypi.org
@@ -88,3 +88,39 @@ jobs:
with:
file: coverage.xml
if: ${{ always() }}
+
+ package:
+ # Build packages and upload
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ include:
+ - os: ubuntu-latest
+ python-version: 3.8
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: recursive
+ fetch-depth: 0
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Display Python version
+ run: python -c "import sys; print(sys.version)"
+ - name: Create virtual environment
+ run: tools/ci/create_venv.sh
+ - name: Build sdist
+ run: tools/ci/build_archive.sh
+ env:
+ INSTALL_TYPE: sdist
+ - name: Build wheel
+ run: tools/ci/build_archive.sh
+ env:
+ INSTALL_TYPE: wheel
+ - name: Test PyPI upload
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: __token__
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
+ repository_url: https://test.pypi.org/legacy/
