From 8249e09a63d4baf042597b382be267f7b2fd9845 Mon Sep 17 00:00:00 2001 From: Hailin Wang Date: Mon, 21 Oct 2024 10:44:54 +0800 Subject: [PATCH] Do not upload wheels to release (#8) --- .github/workflows/wheels.yml | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a8b6d403..d4eb471d 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -23,10 +23,6 @@ concurrency: group: wheels-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -permissions: - contents: write - pull-requests: write - jobs: build-wheels: runs-on: ${{ matrix.os }} @@ -81,14 +77,6 @@ jobs: name: cppbinder-wheels-${{ matrix.os }}-${{ matrix.archs }}-${{ matrix.impl }}-${{ github.event_name == 'release' && github.ref_name || github.sha }} path: ./wheelhouse/*.whl - - name: Upload wheels to release - if: github.event_name == 'release' - shell: bash - run: | - gh release upload ${{ github.ref_name }} ./wheelhouse/*.whl --clobber - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - build-sdist: runs-on: ubuntu-22.04 steps: @@ -116,13 +104,6 @@ jobs: name: cppbinder-sdist-${{ github.event_name == 'release' && github.ref_name || github.sha }} path: ./python/dist/*.tar.gz - - name: Upload source distribution to release - if: github.event_name == 'release' - run: | - gh release upload ${{ github.ref_name }} ./python/dist/*.tar.gz --clobber - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - publish: needs: [build-wheels, build-sdist] if: github.event_name == 'release' @@ -132,10 +113,11 @@ jobs: uses: actions/checkout@v4 - name: Download wheels and source distribution - run: | - gh release download ${{ github.ref_name }} --pattern *.whl --pattern *.tar.gz --dir dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: actions/download-artifact@v4 + with: + pattern: cppbinder-* + path: dist + merge-multiple: true - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@v1.8.14