You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with two workflows in different platforms (A and B) and the workflow B needs an artifact of the workflow A. Also, I'm trying to avoid external services as S3 in order to make it simple.
Is there a way to get a link to the artifacts generated in the last build (latestbuild) or in the last passed build (lastsuccessfulbuild)?
Maybe something like this: https://github.com/{account}/{repo}/workflows/{workflowName}/builds/latest/artifacts/file.zip
No rough ETA but this is something that we really really want to do since it will help enable more complete CI/CD experiences.
Reacted by Teoh Han Hui, David Amrani, Tomoki Togashi, Emmanuel Pescosta, Margen67, adw1n, Kartik Raj, matt wilkie, Jean-Baptiste Skutnik, Christopher Dembia and 15 more
Reacted by Teoh Han Hui, Margen67, João Fouyer, Anton Salnikov and Alexandre Ferreira
Reacted by Teoh Han Hui, Margen67, Jan Martiska, Tushar Chandra, Arne Eirik Nielsen, Anton Salnikov, Alexandre Ferreira and Hendrik Erckens
Reacted by Teoh Han Hui, Aaron Cooper, Alexandre Ferreira and Sean Boult
We would like a direct URL for our nightly builds (like the format proposed in the issue description).
We don't want to trash our repositories GitHub Releases for nightly binaries / many tagged releases - we are also fine with short retention for nightly builds.
We had previously used Travis CI and AppVeyor CI, where none of this was any issue. With GitHub Actions it's a massive headache / various issues.
However, now the actions API and artifact URLs only work for authenticated users: JayFoxRox/GitHub-artifact-URL#4 so the tool doesn't even work for our use-case anymore (which is frustrating, as we waited for a solution for weeks, and had manually updated the download URL on our website for now).
I think a simple script like mine would still work for other use-cases in this issue, though.
@JayFoxRox, you might find eine/tip useful or, at least, inspiring. As a matter of fact, I wrote that action in JavaScript several months ago. Artifacts were not supported, so my strategy was to use a single pre-release and update it. It didn't work as expected, because recreating the release would spam all watchers.
Then, I rewrote it as a Docker Action in Python. The pre-release is kept, but assets are updated/overwritten, hence notifications are not triggered. The usage of tip is similar to this action. Precisely, I accumulate all the artifacts with upload-artifact and I use an additional job to update the "nightly" release:
tip also force-pushes the tag, for it to point to the commit that corresponds to the updated artifacts/assets.
The advantage compared to using GitHub-artifact-URL, is that the pre-relase provides a nice and consistent URL for users to download assets, and no authentication is required: https://github.com/user/repo/releases/download/nightly/artifact_name.ext.
Reacted by Geoff Hutchison, Marco Rolando, BelKed, Rohit Gohri, Ultimate Pea, Marco Fuchs, Rundong Li and Thomas Förster
We would like a direct URL for our nightly builds (like the format proposed in the issue description).
We don't want to trash our repositories GitHub Releases for nightly binaries / many tagged releases - we are also fine with short retention for nightly builds.
We had previously used Travis CI and AppVeyor CI, where none of this was any issue. With GitHub Actions it's a massive headache / various issues.
However, now the actions API and artifact URLs only work for authenticated users: JayFoxRox/GitHub-artifact-URL#4 so the tool doesn't even work for our use-case anymore (which is frustrating, as we waited for a solution for weeks, and had manually updated the download URL on our website for now).
I think a simple script like mine would still work for other use-cases in this issue, though.
Hello, I would like to enable users to download latest commits from my GitHub pages page. Something like @davidmoremad mentioned https://github.com/{account}/{repo}/workflows/{workflowName}/builds/{platform}latest/artifacts/file.zip would be ideal. Is there any progress ?
I saw actions/download-artifact#3 is already closed
I support the need for this fix, as well as many others.
Good management of Artifacts is severely missing from GitHub, and I have to question why given that its so critical a use case for everybody using GitHub with GitHub actions.
This sort of thing - simply getting the most recent build artifact that was part of a build pipeline with a specific status - is so simple and common that I have to assume that the product development teams are not even thinking of the common use cases, which makes me wonder what they're focusing on, and wonder why they're not focusing on the core use cases for GitHub that are so common that they are the reason most people I know don't use Github for their CI/CD; Simply stated I don't understand why Github is Refusing all the cash they could make if they just fixed this.
The default expectation that we will upload everything as an artifact and keep it forever- and be willing to pay that storage - is insane, it does not fit the standard release model where older releases are depreciated or outright removed as legacy (or insecure), and to be honest, the more I hit my head on these common use cases, the more I feel like whoever is driving these teams is severely out of touch with developers.
I just want to be able to get the last 2 releases from a pipeline. I need the last one for the same reason as OP, but I need the one before it for update pipelines.
I'm working with two workflows in different platforms (A and B) and the workflow B needs an artifact of the workflow A. Also, I'm trying to avoid external services as S3 in order to make it simple.
Is there a way to get a link to the artifacts generated in the last build (latestbuild) or in the last passed build (lastsuccessfulbuild)?
Maybe something like this: https://github.com/{account}/{repo}/workflows/{workflowName}/builds/latest/artifacts/file.zip
Activity
bokuweb commentedon Oct 5, 2019
I would like to know how to get link url too. ref #2 (comment)
teohhanhui commentedon Oct 25, 2019
https://github.com/actions/download-artifact
https://help.github.com/en/github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts#passing-data-between-jobs-in-a-workflow
EDIT: Uhh... Sorry, it doesn't work across workflows: #2 (comment)
Update Windows download instructions
Update Windows download instructions (#758)
konradpabjan commentedon Dec 6, 2019
This is more of an issue on the
download-artifactside. See: actions/download-artifact#3No rough ETA but this is something that we really really want to do since it will help enable more complete CI/CD experiences.
JayFoxRox commentedon Feb 2, 2020
Also see related discussions like #27 and #50.
We would like a direct URL for our nightly builds (like the format proposed in the issue description).
We don't want to trash our repositories GitHub Releases for nightly binaries / many tagged releases - we are also fine with short retention for nightly builds.
We had previously used Travis CI and AppVeyor CI, where none of this was any issue. With GitHub Actions it's a massive headache / various issues.
I had made a quick and dirty tool to redirect users to the latest artifact URL using the new API.
This tool is at https://github.com/JayFoxRox/GitHub-artifact-URL/
However, now the actions API and artifact URLs only work for authenticated users: JayFoxRox/GitHub-artifact-URL#4 so the tool doesn't even work for our use-case anymore (which is frustrating, as we waited for a solution for weeks, and had manually updated the download URL on our website for now).
I think a simple script like mine would still work for other use-cases in this issue, though.
I have created #51 for the permission issue.
eine commentedon May 15, 2020
@JayFoxRox, you might find eine/tip useful or, at least, inspiring. As a matter of fact, I wrote that action in JavaScript several months ago. Artifacts were not supported, so my strategy was to use a single pre-release and update it. It didn't work as expected, because recreating the release would spam all watchers.
Then, I rewrote it as a Docker Action in Python. The pre-release is kept, but assets are updated/overwritten, hence notifications are not triggered. The usage of tip is similar to this action. Precisely, I accumulate all the artifacts with upload-artifact and I use an additional job to update the "nightly" release:
tip also force-pushes the tag, for it to point to the commit that corresponds to the updated artifacts/assets.
The advantage compared to using GitHub-artifact-URL, is that the pre-relase provides a nice and consistent URL for users to download assets, and no authentication is required:
https://github.com/user/repo/releases/download/nightly/artifact_name.ext.Titaniumtown commentedon Aug 24, 2020
Thank you so much!
tonyhallett commentedon Apr 6, 2021
I have created this action that creates a comment in pull request and/or associated issues with the link to all / subset of artifacts
https://github.com/marketplace/actions/workflow-artifact-pull-request-comment
Updates to the build workflow
Updates to the build workflow
Updates to the build workflow
Kagami commentedon Jan 16, 2024
Solution similar to @eine
See: #51 (comment)
Willsr71 commentedon Sep 18, 2024
For those looking to grab this in bash, here's a short script for grabbing by workflow run and artifact name: https://gist.github.com/Willsr71/e4884be88f98b4c298692975c0ec8edb
SilverFire commentedon Oct 4, 2024
The same done in two lines of gh, which is available by default in GitHub Actions.
Where the variables are as follows:
WORKFLOW: The path to the GitHub Actions workflow file that is being targeted.ARTIFACT_NAME: The name of the artifact that was produced by the successful workflow run.OUTPUT_DIR: The directory path where the downloaded artifact will be unpacked.Make sure your job has at least a read access to the actions context:
Snowiiii commentedon Oct 13, 2024
Hello, I would like to enable users to download latest commits from my GitHub pages page. Something like @davidmoremad mentioned
https://github.com/{account}/{repo}/workflows/{workflowName}/builds/{platform}latest/artifacts/file.zipwould be ideal. Is there any progress ?I saw actions/download-artifact#3 is already closed
duaneking commentedon Apr 30, 2025
I support the need for this fix, as well as many others.
Good management of Artifacts is severely missing from GitHub, and I have to question why given that its so critical a use case for everybody using GitHub with GitHub actions.
This sort of thing - simply getting the most recent build artifact that was part of a build pipeline with a specific status - is so simple and common that I have to assume that the product development teams are not even thinking of the common use cases, which makes me wonder what they're focusing on, and wonder why they're not focusing on the core use cases for GitHub that are so common that they are the reason most people I know don't use Github for their CI/CD; Simply stated I don't understand why Github is Refusing all the cash they could make if they just fixed this.
The default expectation that we will upload everything as an artifact and keep it forever- and be willing to pay that storage - is insane, it does not fit the standard release model where older releases are depreciated or outright removed as legacy (or insecure), and to be honest, the more I hit my head on these common use cases, the more I feel like whoever is driving these teams is severely out of touch with developers.
I just want to be able to get the last 2 releases from a pipeline. I need the last one for the same reason as OP, but I need the one before it for update pipelines.
vikulin commentedon May 18, 2025
This works for me:
https://github.com/{account}/{repo}/releases/latest/download/file.zip