From ad9de576ddd4048b82c73f45bbc0e47392f4c6d8 Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sat, 6 Jul 2024 23:11:04 +0200 Subject: [PATCH 1/5] ci: enables permalink for download of latest gh release assets removes tag names to unlock latest-permalink --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b04ec97c13..8ee6d8eace 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,7 +82,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 @@ -118,7 +118,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - asset_name: lychee-${{needs.prepare.outputs.tag_name}}-macos-x86_64.dmg + asset_name: lychee-macos-x86_64.dmg asset_path: target/release/lychee.dmg upload_url: ${{needs.prepare.outputs.upload_url}} asset_content_type: application/octet-stream @@ -154,7 +154,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - asset_name: lychee-${{needs.prepare.outputs.tag_name}}-windows-x86_64.exe + asset_name: lychee-windows-x86_64.exe asset_path: target/release/lychee.exe upload_url: ${{needs.prepare.outputs.upload_url}} asset_content_type: application/octet-stream From b1d0e021b7a60f7d821b561951e670cfd68508a8 Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sat, 6 Jul 2024 23:16:23 +0200 Subject: [PATCH 2/5] ci: fix inconsistent gh release asset naming changes macos and windows release assets to follow linux naming scheme: lychee-{cpu}-{platform}.{ext} --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ee6d8eace..e3d89b8afa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,7 +118,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - asset_name: lychee-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 @@ -154,7 +154,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - asset_name: lychee-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 From b310fae2b8915b3a37f09275a1e5d2627613619a Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 15:15:40 +0200 Subject: [PATCH 3/5] ci: fix inconsistent asset naming of nightly builds --- .github/workflows/debug_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debug_build.yml b/.github/workflows/debug_build.yml index bd0294d421..d307e25ea9 100644 --- a/.github/workflows/debug_build.yml +++ b/.github/workflows/debug_build.yml @@ -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: @@ -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 From 817039d5687df72176afa92730c6ded8a902cf8b Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 15:45:57 +0200 Subject: [PATCH 4/5] ci: simplifies Dockerfiles by using latest permalink --- Dockerfile-CI.Dockerfile | 8 ++------ Dockerfile-CI.alpine.Dockerfile | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Dockerfile-CI.Dockerfile b/Dockerfile-CI.Dockerfile index 1f347475b2..6e87799354 100644 --- a/Dockerfile-CI.Dockerfile +++ b/Dockerfile-CI.Dockerfile @@ -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 diff --git a/Dockerfile-CI.alpine.Dockerfile b/Dockerfile-CI.alpine.Dockerfile index 95cf54f816..8394756ba9 100644 --- a/Dockerfile-CI.alpine.Dockerfile +++ b/Dockerfile-CI.alpine.Dockerfile @@ -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 From 3f00c2a09d6d0cc549eb84bfd7cc54404aa666b2 Mon Sep 17 00:00:00 2001 From: axel-kah Date: Sun, 7 Jul 2024 16:37:01 +0200 Subject: [PATCH 5/5] ci: adds comment to keep dependent files in sync --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3d89b8afa..dd5cf038fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: