lycheeverse / lychee-action

Github action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.
https://lychee.cli.rs
Apache License 2.0
323 stars 48 forks source link

Adjust for new asset naming scheme #234

Closed dscho closed 2 months ago

dscho commented 2 months ago

As of #1464, the naming scheme of the release assets has changed, breaking this here GitHub Action. Currently, this can only be seen with the nightly variant, but future releases of lychee will see more severe breakages without this PR or something similar.

mre commented 2 months ago

This looks good. I've added a proposal to notify users about the ongoing transition, but it turned out to be unnecessary. This is purely an internal change and should be backwards-compatible. We can decide to remove the check after a sufficient amount of time to simplify the logic, but there's no user-intervention necessary.

Just to document the behavior for future me, from what I can see, this change covers all four cases:

  1. someone specifies an older version. In this case, we use the old URL for the naming scheme, e.g. https://github.com/lycheeverse/lychee/releases/download/v0.15.1/lychee-v0.15.1-aarch64-unknown-linux-gnu.tar.gz
  2. someone specifies a version after 0.15. In this case, we use the new URL for the naming scheme, e.g. https://github.com/lycheeverse/lychee/releases/download/v0.16.0/lychee-aarch64-unknown-linux-gnu.tar.gz
  3. someone uses "latest", in which case we use https://github.com/lycheeverse/lychee/releases/download/latest/lychee-aarch64-unknown-linux-gnu.tar.gz
  4. someone uses "nightly" in which case the URL is https://github.com/lycheeverse/lychee/releases/tag/nightly/lychee-aarch64-unknown-linux-gnu.tar.gz

Thanks for the fix @dscho!