Skip to content

Commit

Permalink
Harmonizes naming pattern of pre-built binaries and unlocks latest pe…
Browse files Browse the repository at this point in the history
…rmalink (#1464)

* ci: enables permalink for download of latest gh release assets

removes tag names to unlock latest-permalink

* ci: fix inconsistent gh release asset naming

changes macos and windows release assets to follow linux naming scheme: lychee-{cpu}-{platform}.{ext}

* ci: fix inconsistent asset naming of nightly builds

* ci: simplifies Dockerfiles by using latest permalink

* ci: adds comment to keep dependent files in sync
  • Loading branch information
axel-kah authored Aug 6, 2024
1 parent 8df3b99 commit d0c5af9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/debug_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: lychee-${{ github.sha }}-macos-x86_64.dmg
name: lychee-${{ github.sha }}-x86_64-macos.dmg
path: target/release/lychee.dmg

windows:
Expand Down Expand Up @@ -120,5 +120,5 @@ jobs:
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: lychee-${{ github.sha }}-windows-x86_64.exe
name: lychee-${{ github.sha }}-x86_64-windows.exe
path: target/release/lychee.exe
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# CI pipeline for stable binaries
# Keep in sync with:
# - .github/workflows/debug_build.yml
# - Dockerfile-CI.Dockerfile
# - Dockerfile-CI.alpine.Dockerfile
# - https://github.com/lycheeverse/lychee-action/blob/master/action.yml

name: Release
on:
release:
Expand Down Expand Up @@ -82,7 +89,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_name: lychee-${{needs.prepare.outputs.tag_name}}-${{ matrix.target }}.tar.gz
asset_name: lychee-${{ matrix.target }}.tar.gz
asset_path: target/${{ matrix.target }}/release/lychee.tar.gz
upload_url: ${{needs.prepare.outputs.upload_url}}
asset_content_type: application/gzip
Expand Down Expand Up @@ -118,7 +125,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_name: lychee-${{needs.prepare.outputs.tag_name}}-macos-x86_64.dmg
asset_name: lychee-x86_64-macos.dmg
asset_path: target/release/lychee.dmg
upload_url: ${{needs.prepare.outputs.upload_url}}
asset_content_type: application/octet-stream
Expand Down Expand Up @@ -154,7 +161,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_name: lychee-${{needs.prepare.outputs.tag_name}}-windows-x86_64.exe
asset_name: lychee-x86_64-windows.exe
asset_path: target/release/lychee.exe
upload_url: ${{needs.prepare.outputs.upload_url}}
asset_content_type: application/octet-stream
8 changes: 2 additions & 6 deletions Dockerfile-CI.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ RUN apt-get update \
wget \
&& case $(dpkg --print-architecture) in \
"amd64") \
wget -q -O - "$(wget -q -O- https://api.github.com/repos/lycheeverse/lychee/releases/latest \
| jq -r '.assets[].browser_download_url' \
| grep x86_64-unknown-linux-gnu)" | tar -xz lychee \
wget -q -O - https://github.com/lycheeverse/lychee/releases/latest/download/lychee-x86_64-unknown-linux-gnu.tar.gz | tar -xz lychee \
;; \
"arm64") \
wget -q -O - "$(wget -q -O- https://api.github.com/repos/lycheeverse/lychee/releases/latest \
| jq -r '.assets[].browser_download_url' \
| grep aarch64-unknown-linux-gnu)" | tar -xz lychee \
wget -q -O - https://github.com/lycheeverse/lychee/releases/latest/download/lychee-aarch64-unknown-linux-gnu.tar.gz | tar -xz lychee \
;; \
esac \
&& chmod +x lychee
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile-CI.alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ RUN apk update \
&& apk add --no-cache ca-certificates jq wget \
&& case $(arch) in \
"x86_64") \
wget -4 -q -O - "$(wget -4 -q -O- https://api.github.com/repos/lycheeverse/lychee/releases/latest \
| jq -r '.assets[].browser_download_url' \
| grep x86_64-unknown-linux-musl)" | tar -xz lychee \
wget -4 -q -O - https://github.com/lycheeverse/lychee/releases/latest/download/lychee-x86_64-unknown-linux-musl.tar.gz | tar -xz lychee \
;; \
"aarch64") \
wget -4 -q -O - "$(wget -4 -q -O- https://api.github.com/repos/lycheeverse/lychee/releases/latest \
| jq -r '.assets[].browser_download_url' \
| grep arm-unknown-linux-musleabihf)" | tar -xz lychee \
wget -4 -q -O - https://github.com/lycheeverse/lychee/releases/latest/download/lychee-arm-unknown-linux-musleabihf.tar.gz | tar -xz lychee \
;; \
esac \
&& chmod +x lychee
Expand Down

0 comments on commit d0c5af9

Please sign in to comment.