-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade upload-artifact
and download-artifact
actions from v3
to v4
#178
Conversation
dd84228
to
c3784c9
Compare
Should not be a breaking upgrade as `artifact-name` is generated from the tox environment name so should already be unique to the job. (Artifacts are immutable in v4.)
cc5428c
to
33e10a8
Compare
Thanks! Is this compatible with how astropy uses this workflow in https://github.com/astropy/astropy/blob/main/.github/workflows/publish.yml ? cc @astrofrog and @saimn |
For other downstream packages that uses this, will things just work or we have to change stuff too in our own repos? |
Given that some artifacts are uploaded as nightly wheels (say, to https://anaconda.org/astropy/astropy/files?type=pypi ), how will this affect the "old files pruning" script that @astrofrog previously implemented? |
Tested in this workflow run: https://github.com/OpenAstronomy/github-actions-workflows/actions/runs/7412831365/job/20170967258?pr=178#step:4:6 |
33e10a8
to
6e927a3
Compare
The astropy workflow looks to be compatible with the changes in this PR. This PR should not introduce any breaking changes for any repo. The only new breakage would be workflows that are building the same target more than once which is likely a mistake – the astropy workflow doesn't have this issue because the upload to PyPI is disabled in the first job so only one artifact is saved for that duplicate build target. |
This PR should not affect that. The publish workflow changes in this PR only affect how built wheels and sdists are passed from the build jobs to the upload job. |
Can this be merged and a release made? I dunno what is going on but the released upload workflow is terribly broken: https://github.com/astropy/astropy/actions/runs/7620855779/job/20756741326 (it keeps the very old wheel but deletes the new wheels that are supposed to be uploaded) 🔥 |
The
v3
tov4
upgrade introduces three breaking changes: https://github.com/actions/upload-artifact#breaking-changesTwo of them are not relevant as we don't support self-hosted runners, and we only ever save one artifact per job.
The other is that the artifacts are now immutable -- we cannot keep uploading wheels to the same artifact in each job. I've updated the workflow to write a separate artifact per build job and merge them in the upload job.
Supersedes #173 and #174.