@@ -65,10 +65,44 @@ jobs:
6565 if nix develop -c nu .github/scripts/ghostty-tip $GHOSTTY_COMMIT_LONG; then
6666 echo "Tip release already exists for commit $GHOSTTY_COMMIT_LONG"
6767 echo "should_skip=true" >> $GITHUB_OUTPUT
68- else
69- echo "No tip release found for commit $GHOSTTY_COMMIT_LONG"
70- echo "should_skip=false" >> $GITHUB_OUTPUT
68+ exit 0
7169 fi
70+ echo "No tip release found for commit $GHOSTTY_COMMIT_LONG"
71+
72+ # Skip the release when nothing release-relevant changed since
73+ # the last tip (e.g. only VOUCHED.td or other .github metadata
74+ # changed). Files under .github don't affect the built artifacts,
75+ # with the exception of the release workflows and scripts, which
76+ # affect how the artifacts are built and should therefore be
77+ # exercised by a fresh build.
78+ #
79+ # This list is intentionally independent from the skip filter in
80+ # test.yml: that one gates CI jobs and must stay narrow so that
81+ # .github changes are still linted.
82+ #
83+ # Manual dispatches always build.
84+ if [ "$GITHUB_EVENT_NAME" = "workflow_run" ] &&
85+ git rev-parse -q --verify refs/tags/tip >/dev/null; then
86+ relevant=false
87+ while IFS= read -r path; do
88+ case "$path" in
89+ .github/workflows/release-*.yml | .github/scripts/*)
90+ relevant=true
91+ ;;
92+ .github/*) ;;
93+ *)
94+ relevant=true
95+ ;;
96+ esac
97+ done < <(git diff --name-only tip..HEAD)
98+ if [ "$relevant" = "false" ]; then
99+ echo "Only non-release files changed since the last tip, skipping"
100+ echo "should_skip=true" >> $GITHUB_OUTPUT
101+ exit 0
102+ fi
103+ fi
104+
105+ echo "should_skip=false" >> $GITHUB_OUTPUT
72106
73107 tag :
74108 runs-on : namespace-profile-ghostty-sm
0 commit comments