From e718b4b63e87500424637037de04b2e89460dd0b Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 16 Oct 2026 14:11:57 +0200 Subject: [PATCH] Check that the fork's release.yml matches upstream's Releases run the release workflow of the stefanhaller/lazygit fork, but build the code of jesseduffield/lazygit. If the fork's master is behind, its copy of release.yml can differ from upstream's, and the release runs with outdated steps. This may only show up after the new tag has already been pushed. Stop the release right after checking out the code if the running release.yml differs from the one on jesseduffield/lazygit's master. Compare with master rather than with the branch being released. A patch release from a branch off an older tag carries an older release.yml, and it should still be released with the current workflow. This means that changes to release.yml can no longer be tried out in the fork before they land upstream. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85426e6d5..4fd637aec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,18 @@ jobs: token: ${{ secrets.LAZYGIT_RELEASE_PAT }} fetch-depth: 0 + - name: Check that release.yml is up to date + run: | + # This workflow runs in a fork, but releases jesseduffield/lazygit, so + # its release.yml must match the one on jesseduffield/lazygit's master. + git fetch --quiet "https://github.com/$GITHUB_REPOSITORY" "$GITHUB_WORKFLOW_SHA" + + if ! git diff --quiet "$GITHUB_WORKFLOW_SHA" origin/master -- .github/workflows/release.yml; then + echo "Error: release.yml differs from the one on jesseduffield/lazygit's master." + echo "Update $GITHUB_REPOSITORY from there and run the workflow again." + exit 1 + fi + - name: Get Latest Tag run: | latest_tag=$(git describe --tags --abbrev=0 || echo "v0.0.0")