From 13fb05c4fa5b584b3ce98647790c7687c943de4e Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Fri, 19 Jul 2024 10:42:50 +0200 Subject: [PATCH 1/2] Test pip release creation as part of normal CI --- .github/workflows/pip-release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pip-release.yml b/.github/workflows/pip-release.yml index 2c514ac55..c1e6a7a58 100644 --- a/.github/workflows/pip-release.yml +++ b/.github/workflows/pip-release.yml @@ -13,6 +13,8 @@ on: types: - "published" workflow_dispatch: + push: + pull_request: permissions: contents: write @@ -49,11 +51,13 @@ jobs: manylinux: auto working-directory: apis/python/node - name: Upload wheels + if: github.event_name == 'release' uses: actions/upload-artifact@v4 with: name: wheels-linux-${{ matrix.platform.target }} path: apis/python/node/dist - name: Upload to release + if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -86,11 +90,13 @@ jobs: manylinux: musllinux_1_2 working-directory: apis/python/node - name: Upload wheels + if: github.event_name == 'release' uses: actions/upload-artifact@v4 with: name: wheels-musllinux-${{ matrix.platform.target }} path: apis/python/node/dist - name: Upload to release + if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -127,11 +133,13 @@ jobs: args: --release -o dist working-directory: apis/python/node - name: Upload wheels + if: github.event_name == 'release' uses: actions/upload-artifact@v3 with: name: wheels-musllinux-${{ matrix.platform.target }} path: apis/python/node/dist - name: Upload to release + if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -160,11 +168,13 @@ jobs: sccache: "true" working-directory: apis/python/node - name: Upload wheels + if: github.event_name == 'release' uses: actions/upload-artifact@v4 with: name: wheels-windows-${{ matrix.platform.target }} path: apis/python/node/dist - name: Upload to release + if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -194,11 +204,13 @@ jobs: sccache: "true" working-directory: apis/python/node - name: Upload wheels + if: github.event_name == 'release' uses: actions/upload-artifact@v4 with: name: wheels-macos-${{ matrix.platform.target }} path: apis/python/node/dist - name: Upload to release + if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -217,6 +229,7 @@ jobs: args: --out dist working-directory: apis/python/node - name: Upload sdist + if: github.event_name == 'release' uses: actions/upload-artifact@v3 with: name: wheels @@ -225,7 +238,7 @@ jobs: release: name: Release runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" + if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/') needs: [linux, musllinux, musleabi, windows, macos, sdist] steps: - uses: actions/download-artifact@v4 From 99f054ccbf173eb2596f9bb16d4c498e2d5108c0 Mon Sep 17 00:00:00 2001 From: Haixuan Xavier Tao Date: Sun, 21 Jul 2024 08:35:30 +0200 Subject: [PATCH 2/2] Only check pip release on push to main --- .github/workflows/pip-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pip-release.yml b/.github/workflows/pip-release.yml index c1e6a7a58..1916c0d7a 100644 --- a/.github/workflows/pip-release.yml +++ b/.github/workflows/pip-release.yml @@ -14,6 +14,8 @@ on: - "published" workflow_dispatch: push: + branches: + - main pull_request: permissions: