Skip to content

Commit

Permalink
Fix Python upload for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
xioTechnologies authored Jan 12, 2024
1 parent c13350e commit be67165
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ jobs:
CIBW_TEST_COMMAND: cd {project}/Python && python advanced_example.py no_block && python simple_example.py no_block
CIBW_TEST_COMMAND_WINDOWS: cd /D {project}/Python && python advanced_example.py no_block && python simple_example.py no_block

- if: startsWith(github.ref, 'refs/tags/v')
name: Upload wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TOKEN }}
run: python -m twine upload --verbose --repository pypi wheelhouse/* --skip-existing
- uses: actions/upload-artifact@v3
with:
path: wheelhouse/*

build_sdist:
runs-on: ubuntu-latest
Expand All @@ -80,9 +77,27 @@ jobs:
- name: Build sdist
run: python setup.py sdist

- if: startsWith(github.ref, 'refs/tags/v')
name: Upload sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*

publish:
runs-on: ubuntu-latest
needs: [ build_wheels, build_sdist ]
if: startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/download-artifact@v3
with:
path: artifacts

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install twine
- name: Publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TOKEN }}
run: python -m twine upload --verbose --repository pypi dist/*
run: python -m twine upload --verbose --repository pypi artifacts/* --skip-existing

0 comments on commit be67165

Please sign in to comment.