Github Artifacts
How to get the latest artifacts from GitHub
At the time of writing the article GitHub has’t gotten around to providing predictable URLs for the latest build artifacts.
e.g. https://github.com/{owner}/{repo}/artifacts/latest
However you can query the rest API to find the latest artifacts including a download url:
GET https://api.github.com/repos/{owner}/{repo}/actions/artifacts
{
"total_count": 2,
"artifacts": [
{
"id": 13510787,
"node_id": "MDg6QXJ0aWKlm3QxMzUxMDc4Nw==",
"name": "public",
"size_in_bytes": 9825,
"url": "https://api.github.com/repos/{owner}/{repo}/actions/artifacts/13510787",
"archive_download_url": "https://api.github.com/repos/{owner}/{repo}/actions/artifacts/13510787/zip",
"expired": false,
"created_at": "2020-08-08T15:28:55Z",
"updated_at": "2020-08-08T15:28:56Z"
},
{
"id": 13463088,
"node_id": "MDg6QXJ0aWZhB8gxMzQ2MzA4OA==",
"name": "public",
"size_in_bytes": 7086,
"url": "https://api.github.com/repos/{owner}/{repo}/actions/artifacts/13463088",
"archive_download_url": "https://api.github.com/repos/{owner}/{repo}/actions/artifacts/13463088/zip",
"expired": false,
"created_at": "2020-08-07T20:50:41Z",
"updated_at": "2020-08-07T20:50:42Z"
}
]
}