Skip to content

Commit

Permalink
Removed build for multiple platforms as it was causing duplicate file…
Browse files Browse the repository at this point in the history
… issues on testpypi
  • Loading branch information
shashankmc committed Jul 4, 2024
1 parent 8e6d984 commit f0ce7a1
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit f0ce7a1

Please sign in to comment.