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) <noreply@anthropic.com>
This commit is contained in:
Stefan Haller
2026-10-16 14:22:57 +02:00
co-authored by Claude Opus 5.5
parent 63ab89fff4
commit e718b4b63e
+12
View File
@@ -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")