From f0ce7a143189fe628418eb00a1fd4c9cbf365721 Mon Sep 17 00:00:00 2001 From: shashankmc Date: Thu, 4 Jul 2024 15:35:11 +0200 Subject: [PATCH] Removed build for multiple platforms as it was causing duplicate file issues on testpypi --- .github/workflows/github-actions.yml | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9f6c005..e9aa9ae 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -6,8 +6,8 @@ on: branches: [ cellar ] jobs: - build: - name: Build wheels on ${{ matrix.os }} + test: + name: Test on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: @@ -38,19 +38,25 @@ jobs: pip install pytest pytest-cov pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html - - name: Build wheels - run: | - python cellar/setup.py sdist bdist_wheel - - - name: Upload wheels - uses: actions/upload-artifact@v4 + build: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 with: - name: python-${{ matrix.python-version }}-${{ matrix.os }}-wheels + python-version: '3.9' + - run: | + python -m pip install --upgrade pip + pip install setuptools wheel + - run: python cellar/setup.py sdist bdist_wheel + - uses: actions/upload-artifact@v4 + with: + name: universal-wheels path: | dist/*.whl dist/*.tar.gz if-no-files-found: error - + testpypi-publish: name: Publish to TestPyPI needs: build @@ -70,13 +76,12 @@ jobs: - name: Publish distribution to TestPyPi uses: pypa/gh-action-pypi-publish@release/v1 with: - repository_url: https://test.pypi.org/legacy/ - packages_dir: dist/*/ + repository-url: https://test.pypi.org/legacy/ + packages-dir: dist/* pypi-publish: name: Publish to PyPI needs: - - build - testpypi-publish runs-on: ubuntu-latest environment: