Open straight-shoota opened 2 years ago
Hm, just checking for the number of assets is not very resilient.
There could be some assets, but just the one we're currently looking for might be missing.
My idea would be to refactor the control flow. getLatestTag
could return the list of tags and then we iterate until we find one that provides the requested artifact.
When making a Crystal release, we first tag a commit and publish a release on GitHub. The build pipeline only start after that has happend, and artifacts such as the distribution packages are added as soon as the pipeline has finished. During this time frame, the release has no binary packages attached and
install-crystal
forlatest
fails because there's no package to download.Example: https://github.com/crystal-lang/shards/runs/6133683332
The time frame is not that long (it usually takes about 1 hour for the distribution packages to appear), but it's still bad to have all actions during that time. And there could always be unforseeable issues causing delays. So it's better to be safe.
A fix should be relatively easy. If there's no download available, we can circle back and try the second to last release.