Skip to content
This repository was archived by the owner on Oct 21, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Only push and manual dispatch run here: a pull_request trigger would let
# untrusted code reach the self-hosted Mac.

name: Main build
name: Fork Release

on:
push:
Expand All @@ -26,7 +26,7 @@ permissions:

# The newest main wins; a superseded build is not worth finishing.
concurrency:
group: main-build
group: fork-release
cancel-in-progress: true

env:
Expand Down Expand Up @@ -239,20 +239,30 @@ jobs:
with:
pattern: build-*
merge-multiple: true
path: assets
path: downloaded

# Multi-path uploads keep their directories (release/, release-cli/),
# and a release takes files only.
- name: Flatten assets
run: |
mkdir assets
find downloaded -type f -exec mv -n {} assets/ \;
ls -la assets

- name: Write checksums
working-directory: assets
run: |
sha256sum t3-*.tar.gz > SHA256SUMS
cat SHA256SUMS

# A re-run replaces the release its failed attempt may have left behind.
- name: Create release
run: |
gh release delete "${{ needs.version.outputs.tag }}" --yes --cleanup-tag 2>/dev/null || true
gh release create "${{ needs.version.outputs.tag }}" assets/* \
--target "$GITHUB_SHA" \
--title "${{ needs.version.outputs.name }}" \
--notes "Main build of ${GITHUB_SHA::12}." \
--notes "Fork build of ${GITHUB_SHA::12}." \
--prerelease

- name: Prune old builds
Expand Down Expand Up @@ -289,10 +299,12 @@ jobs:
set -euo pipefail
shopt -s nullglob

zips=(artifacts/*.zip)
archive="artifacts/t3-$VERSION-darwin-arm64.tar.gz"
# Artifacts keep their upload directories, so locate files by name.
zips=()
while IFS= read -r zip; do zips+=("$zip"); done < <(find artifacts -type f -name '*.zip')
archive="$(find artifacts -type f -name "t3-$VERSION-darwin-arm64.tar.gz" | head -n 1)"
[[ ${#zips[@]} -eq 1 ]] || { echo "Expected one app zip, found ${#zips[@]}." >&2; exit 1; }
[[ -f "$archive" ]] || { echo "Missing $archive." >&2; exit 1; }
[[ -n "$archive" ]] || { echo "Missing t3-$VERSION-darwin-arm64.tar.gz." >&2; exit 1; }

# Unpack and check everything before touching the installed copy.
unpacked="$RUNNER_TEMP/app"
Expand Down