Skip to content

Commit

Permalink
Work around new naming scheme
Browse files Browse the repository at this point in the history
Until version 0.15.1, the naming scheme of the release assets let them
start with `lychee-<version>-`. This is no longer the case as of
lycheeverse/lychee#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 <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Aug 12, 2024
1 parent ef72ff8 commit c1bbdd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c1bbdd0

Please sign in to comment.