diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 61dfba7..5840d6b 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -4,7 +4,7 @@ # - https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ # # derived from https://github.com/Farama-Foundation/PettingZoo/blob/e230f4d80a5df3baf9bd905149f6d4e8ce22be31/.github/workflows/build-publish.yml -name: build-publish +name: Build artifact for PyPI on: push: @@ -16,52 +16,35 @@ on: jobs: build-wheels: - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-latest - python: 38 - platform: manylinux_x86_64 - - os: ubuntu-latest - python: 39 - platform: manylinux_x86_64 - - os: ubuntu-latest - python: 310 - platform: manylinux_x86_64 - - os: ubuntu-latest - python: 311 - platform: manylinux_x86_64 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install dependencies run: python -m pip install --upgrade pip setuptools build + - name: Build sdist and wheels run: python -m build + - name: Store wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: dist publish: runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/momaland needs: - build-wheels if: github.event_name == 'release' && github.event.action == 'published' steps: - name: Download dists - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: artifact path: dist + - name: Publish uses: pypa/gh-action-pypi-publish@release/v1 with: