diff --git a/.github/workflows/update-colorschemes.yml b/.github/workflows/update-colorschemes.yml index 6c3a87659..569ad83a5 100644 --- a/.github/workflows/update-colorschemes.yml +++ b/.github/workflows/update-colorschemes.yml @@ -40,9 +40,11 @@ jobs: - name: Run zig fetch id: zig_fetch run: | - UPSTREAM_REV="$(curl "https://api.github.com/repos/mbadolato/iTerm2-Color-Schemes/commits/master" | jq -r '.sha')" - nix develop -c zig fetch --save="iterm2_themes" "https://github.com/mbadolato/iTerm2-Color-Schemes/archive/$UPSTREAM_REV.tar.gz" - echo "upstream_rev=$UPSTREAM_REV" >> "$GITHUB_OUTPUT" + # Get the latest release from iTerm2-Color-Schemes + RELEASE_INFO=$(gh api repos/mbadolato/iTerm2-Color-Schemes/releases/latest) + TAG_NAME=$(echo "$RELEASE_INFO" | jq -r '.tag_name') + nix develop -c zig fetch --save="iterm2_themes" "https://github.com/mbadolato/iTerm2-Color-Schemes/releases/download/${TAG_NAME}/ghostty-themes.tgz" + echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - name: Update zig cache hash run: | @@ -71,5 +73,5 @@ jobs: build.zig.zon.json flatpak/zig-packages.json body: | - Upstream revision: https://github.com/mbadolato/iTerm2-Color-Schemes/tree/${{ steps.zig_fetch.outputs.upstream_rev }} + Upstream release: https://github.com/mbadolato/iTerm2-Color-Schemes/releases/tag/${{ steps.zig_fetch.outputs.tag_name }} labels: dependencies