Skip to content

Commit efd749a

Browse files
Update publish.yml
Scope artifacts by run id/attempt
1 parent 5ecb7f2 commit efd749a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ jobs:
209209
if: |
210210
needs.targets.outputs.upload_to_pypi == 'true' || inputs.upload_to_anaconda
211211
with:
212-
name: "dist-${{ matrix.target }}-${{ matrix.CIBW_ARCHS }}"
213-
path: dist/*
212+
name: "dist-${{ matrix.target }}-${{ matrix.CIBW_ARCHS }}-${{ github.run_id }}-${{ github.run_attempt }}"
213+
path: dist/*
214214

215215
build_sdist:
216216
name: Build source distribution
@@ -254,8 +254,9 @@ jobs:
254254
if: |
255255
needs.targets.outputs.upload_to_pypi == 'true' || inputs.upload_to_anaconda
256256
with:
257-
name: dist-sdist
258-
path: dist/*
257+
name: dist-sdist-${{ github.run_id }}-${{ github.run_attempt }}
258+
path: dist/*
259+
259260

260261
upload:
261262
name: Upload
@@ -270,10 +271,11 @@ jobs:
270271
needs.build_sdist.result != 'failure'
271272
steps:
272273
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
273-
with:
274-
pattern: dist-*
275-
path: dist
276-
merge-multiple: true
274+
with:
275+
pattern: dist-*-${{ github.run_id }}-${{ github.run_attempt }}
276+
path: dist
277+
merge-multiple: true
278+
277279

278280
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
279281
name: Upload to PyPI

0 commit comments

Comments
 (0)