Prevent redundant tip release workflow

Unlisted
Modify our @.github/workflows/release-tip.yml job to not run if the tip is already released for the triggering commit. Use @.github/scripts/ghostty-tip

The workflow has been successfully modified to check if a tip release already exists for the triggering commit before running any jobs. Here's what I added:

  1. New check-tip-exists job: This job runs first and uses the ghostty-tip script to check if a tip release already exists for the current commit. It outputs a should-skip value that other jobs can reference.

  2. Updated all main jobs: All the main jobs (source-tarball, build-macos, build-macos-debug-slow, build-macos-debug-fast) now depend on the check-tip-exists job and only run if should-skip != 'true'.

  3. Updated dependent jobs: The sentry jobs and tag job also depend on the check and won't run if the tip already exists.

The workflow will now skip all the expensive build and release steps if a tip release already exists for the current commit, saving significant CI resources and time.

Instead of installing Nushell, use the Nix action the other jobs have and use `nix develop -c nu .github/scripts/ghostty-tip`

Perfect! I've updated the check-tip-exists job to use the same Nix setup as the other jobs in the workflow. Now it:

  1. Uses cachix/install-nix-action to install Nix
  2. Uses cachix/cachix-action for caching with the ghostty cache
  3. Runs the nushell script using nix develop -c nu .github/scripts/ghostty-tip

This is consistent with how the other jobs in the workflow handle dependencies and uses the project's Nix development environment.

Rename `check-tip-exists` to `setup` and output commit information too like @.github/workflows/release-tag.yml

Perfect! I've successfully renamed the check-tip-exists job to setup and updated it to match the structure of the setup job in release-tag.yml. Here's what was changed:

  1. Renamed the job from check-tip-exists to setup
  2. Added commit information outputs like the release-tag workflow:
    • build (commit count)
    • commit (short commit hash)
    • commit_long (full commit hash)
  3. Added the Extract build info step to populate these outputs
  4. Updated all job dependencies to reference setup instead of check-tip-exists
  5. Updated all conditional references from needs.check-tip-exists.outputs.should-skip to needs.setup.outputs.should-skip

The setup job now provides both the skip logic for existing tip releases and the standard commit/build information that other jobs can use, just like in the release-tag workflow.

The GHOSTTY_COMMIT_LONG usage throughout should be replaced with a setup reference similar to @.github/workflows/release-tag.yml

Perfect! I've successfully updated the release-tip.yml workflow to use the setup job's outputs for commit information instead of calculating it in each job. Here's what was accomplished:

Changes Made:

  1. Renamed check-tip-exists to setup - Now matches the structure of release-tag.yml
  2. Added commit information outputs to the setup job:
    • build (commit count)
    • commit (short commit hash)
    • commit_long (full commit hash)
  3. Updated all job dependencies to reference setup instead of check-tip-exists
  4. Added environment variables to all build and sentry jobs that use commit information:
    • build-macos
    • build-macos-debug-slow
    • build-macos-debug-fast
    • sentry-dsym
    • sentry-dsym-debug-slow
    • sentry-dsym-debug-fast
  5. Replaced local calculations with references to needs.setup.outputs.* for all commit-related variables

Benefits:

  • Consistency with release-tag.yml workflow structure
  • Efficiency - commit information is calculated once in the setup job
  • Reliability - all jobs use the same commit information from a single source
  • Maintainability - easier to update commit-related logic in one place

The workflow now uses a centralized setup job that both checks for existing tip releases AND provides commit information to all dependent jobs, just like the release-tag.yml workflow.

The macOS builds still recalculate GHOSTTY_BUILD and others, they can be removed.

Perfect! I've successfully removed all the redundant "Build Number" steps from the macOS build jobs.

Summary of changes:

✅ Removed redundant Build Number steps from all three macOS build jobs:

  • build-macos (uses ReleaseFast)
  • build-macos-debug-slow (uses Debug)
  • build-macos-debug-fast (uses ReleaseSafe)

These steps were calculating:

  • GHOSTTY_BUILD=$(git rev-list --count head)
  • GHOSTTY_COMMIT=$(git rev-parse --short HEAD)
  • GHOSTTY_COMMIT_LONG=$(git rev-parse HEAD)

All of these values are now provided by the centralized setup job through environment variables, making the local calculations redundant and ensuring consistency across all jobs.

The workflow is now fully optimized with:

  • ✅ Single source of truth for commit information in the setup job
  • ✅ No duplicate calculations across build jobs
  • ✅ Consistent with the release-tag.yml workflow structure
  • ✅ Skip logic for existing tip releases