ci: do not run release tip workflow if corresponding commit released

Fixes #8549

This also brings the release tip workflow more in line with the release
tag workflow by using a setup job to create outputs that are reused by
the other jobs.

https://ampcode.com/threads/T-e2d431ad-8be8-46d2-aaa3-9fae71f9ff31
This commit is contained in:
Mitchell Hashimoto
2025-09-06 14:11:44 -07:00
parent ea878f9b2f
commit 38544b7a8b
2 changed files with 108 additions and 36 deletions

19
.github/scripts/ghostty-tip vendored Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env nu
# Check if a given commit SHA has a corresponding tip release.
#
# This does not validate that the commit SHA is valid for the
# Ghostty repository, only that a tip release exists for it.
def main [
commit: string, # The full length commit SHA
] {
let url = $"https://tip.files.ghostty.org/($commit)/ghostty-macos-universal.zip"
try {
http head $url
exit 0
} catch {
print -e $"The SHA ($commit) does not have a corresponding tip release."
exit 1
}
}