diff --git a/.github/workflows/ci-wheels.yml b/.github/workflows/ci-wheels.yml index e20d5ad6..d89eb35b 100644 --- a/.github/workflows/ci-wheels.yml +++ b/.github/workflows/ci-wheels.yml @@ -64,6 +64,7 @@ jobs: arch: "x86_64" - os: "macos-13" arch: "arm64" + steps: - uses: actions/checkout@v4 with: @@ -139,37 +140,40 @@ jobs: name: pypi-artifacts-bdist-${{ matrix.os }}-${{ matrix.arch }} path: ${{ github.workspace }}/wheelhouse/*.whl + build_sdist: name: "Build sdist" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: "Building sdist" - shell: bash - run: | - pipx run build --sdist + - name: "Building sdist" + shell: bash + run: | + pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: pypi-artifacts-sdist + path: ${{ github.workspace }}/dist/*.tar.gz - - uses: actions/upload-artifact@v4 - with: - name: pypi-artifacts-sdist - path: ${{ github.workspace }}/dist/*.tar.gz show-artifacts: needs: [build_bdist, build_sdist] name: "Show artifacts" runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v4 - with: - path: ${{ github.workspace }}/dist - merge-multiple: true + - uses: actions/download-artifact@v4 + with: + path: ${{ github.workspace }}/dist + merge-multiple: true + + - shell: bash + run: | + ls -l ${{ github.workspace }}/dist - - shell: bash - run: | - ls -l ${{ github.workspace }}/dist publish-artifacts-test-pypi: needs: [build_bdist, build_sdist] @@ -178,18 +182,19 @@ jobs: # upload to Test PyPI for every commit on main branch if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' steps: - - uses: actions/download-artifact@v4 - with: - path: ${{ github.workspace }}/dist - merge-multiple: true - - - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - skip_existing: true - print_hash: true + - uses: actions/download-artifact@v4 + with: + path: ${{ github.workspace }}/dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + skip_existing: true + print_hash: true + publish-artifacts-pypi: needs: [build_bdist, build_sdist] @@ -198,13 +203,13 @@ jobs: # upload to PyPI for every tag starting with 'v' if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') steps: - - uses: actions/download-artifact@v4 - with: - path: ${{ github.workspace }}/dist - merge-multiple: true - - - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} - print_hash: true + - uses: actions/download-artifact@v4 + with: + path: ${{ github.workspace }}/dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + print_hash: true