From c1bbdd0adbd7bf3b2bb644b3989cac101461362e Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 12 Aug 2024 13:42:22 +0200 Subject: [PATCH] Work around new naming scheme Until version 0.15.1, the naming scheme of the release assets let them start with `lychee--`. This is no longer the case as of https://github.com/lycheeverse/lychee/pull/1464, though, breaking the `lychee-action`. Since we need to allow using older versions, still, we are now stuck with a really ugly `case` construct, but this is still far better than having a broken GitHub Action. Signed-off-by: Johannes Schindelin --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 43e78d0..8b4060a 100644 --- a/action.yml +++ b/action.yml @@ -48,7 +48,10 @@ runs: run: | # Cleanup artifacts from previous run in case it crashed rm -rf "lychee-${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz" lychee - filename='${{ inputs.LYCHEEVERSION }}/lychee-${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz' + case '${{ inputs.LYCHEEVERSION }}' in + 0.0*|0.1[0-5].*) filename='${{ inputs.LYCHEEVERSION }}/lychee-${{ inputs.LYCHEEVERSION }}-x86_64-unknown-linux-gnu.tar.gz';; + *) filename='${{ inputs.LYCHEEVERSION }}/lychee-x86_64-unknown-linux-gnu.tar.gz' + esac curl -sfLO "https://github.com/lycheeverse/lychee/releases/download/${{ inputs.LYCHEEVERSION }}/$filename" tar -xvzf "$filename" rm "$filename"