Skip to content

Commit 7b01ceb

Browse files
publish_pypi_index as a separate step that runs on a push
1 parent 20dfc07 commit 7b01ceb

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/package.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,18 @@ jobs:
5252
name: wheels-${{ env.OS_NAME }}-${{ env.ARCH }}
5353
path: wheelhouse/confluent_kafka*.whl
5454

55-
publish_pypi_index:
55+
create_release_artifacts:
5656
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
57-
name: Build a PyPI-compatible index
57+
name: Create release artifacts
5858
needs: [build-linux-x64, build-windows]
5959
runs-on: ubuntu-latest
60-
permissions:
61-
contents: write
62-
actions: read
63-
packages: read
64-
pages: write
65-
id-token: write
66-
steps:
67-
- uses: actions/checkout@v2
60+
steps:
6861
- uses: actions/download-artifact@v4
6962
with:
7063
path: artifacts
7164
pattern: wheels-*
7265
merge-multiple: true
73-
66+
7467
- name: Create release
7568
uses: softprops/action-gh-release@v2
7669
with:
@@ -79,6 +72,19 @@ jobs:
7972
env:
8073
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8174

75+
publish_pypi_index:
76+
name: Build a PyPI-compatible index
77+
runs-on: ubuntu-latest
78+
needs: [create_release_artifacts]
79+
if: ${{ always() && !failure() && !cancelled() }}
80+
permissions:
81+
contents: write
82+
actions: read
83+
packages: read
84+
pages: write
85+
id-token: write
86+
steps:
87+
- uses: actions/checkout@v2
8288
- name: Generate Package Index
8389
run: |
8490
python -m pip install --upgrade pip

0 commit comments

Comments
 (0)