diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 683ff90..1353d50 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,11 +1,3 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Build wheels and sdist and upload to PyPI on: @@ -16,64 +8,28 @@ permissions: contents: read jobs: - build_linux_wheels: - name: Build wheels on standard linux - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Build wheels - uses: pypa/cibuildwheel@v2.9.0 - env: - CIBW_BUILD: "*manylinux*" - CIBW_SKIP: cp36* pp* - - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - - build_sdist: - name: Build sdist and upload to PyPI - needs: build_linux_wheels - # Just need to build sdist on a single machine + deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v3 - with: - python-version: "3.10" - - - name: Install dependencies - run: | - python -m pip install -U pip - pip install -U numpy setuptools - pip install -U . - - - name: Download wheels - uses: actions/download-artifact@v4.1.7 - with: - path: ./wheels - - - name: Build sdist - run: | - python setup.py sdist - ls -l dist - tar tvfz dist/yet_another_wizz-*.tar.gz - - - name: Copy wheels - run: | - echo ls -l wheels - ls -l wheels - echo ls -l wheels/artifact - ls -l wheels/artifact - cp wheels/artifact/*.whl dist - echo ls -l dist - ls -l dist - - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.x + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U . + + - name: Build the package + run: python -m build + + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}