diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 190e013..b13b653 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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