mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-25 09:46:05 +00:00
* chore(release): verify releases on isolated release branches and harden shipping High-traffic merges on main cancel more than half of main CI runs, so waiting on main CI repeatedly stalls releases. Releases also ran duplicate post-tag CI, lacked a release-branch Desktop Packages trigger, hit unretried Apple notarytool polling errors and a finalize-rollout directory bug on macOS retries, and relied on a non-idempotent npm publish chain and conflict-prone reconcile cherry-picks. This splits release execution into release:prep:* (reversible version commit without tagging, pushed once to release/** for isolated CI + Desktop Packages) and release:ship[:beta] (idempotent npm publishing with retry, propagation checks, automatic beta dist-tag sync on stable, and release/*-only tag push), adds conflict-free main reconciliation, and extends macOS xcrun retries to notarytool submit and wait. * fix(release): address review findings on Docker retries, tag push, and reconciliation Isolate manual Docker publish dispatches in their own non-cancelling concurrency group, verify HEAD matches origin/<release-branch> before release:ship publishes or tags (and remove one-shot combined scripts that bypassed release-branch checks), drop --refs from peeled annotated-tag lookups in push-current-release-tag.mjs, retry lockfile sync in reconcile-release.mjs when package-lock.json version lags package.json, and document cutting from pre-existing tags. * fix(release): preserve TTY OTP prompts in npm publish and keep newer beta changelogs Inherit TTY stdin/stdout for interactive npm publish and dist-tag add (plus --otp passthrough) while keeping stderr piped for retry classification, and keep newer beta or promoted stable changelog entries intact when an older beta tag is reconciled.
125 lines
3.9 KiB
YAML
125 lines
3.9 KiB
YAML
name: Nix
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- uses: cachix/install-nix-action@v31
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Update lockfile + Nix hash if stale
|
|
run: ./scripts/update-nix.sh
|
|
|
|
- name: Build Nix package
|
|
run: nix build .#default -o result
|
|
|
|
- name: Smoke Nix daemon
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
export PASEO_HOME
|
|
PASEO_HOME="$(mktemp -d)"
|
|
export PASEO_LISTEN=127.0.0.1:6767
|
|
|
|
WRAPPER_LOG="$PASEO_HOME/paseo-cli.log"
|
|
|
|
cleanup() {
|
|
if [[ -n "${DAEMON_PID:-}" ]] && kill -0 "$DAEMON_PID" 2>/dev/null; then
|
|
kill "$DAEMON_PID"
|
|
wait "$DAEMON_PID" || true
|
|
fi
|
|
rm -rf "$PASEO_HOME"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
PASEO_WEB_UI_ENABLED=true PASEO_RELAY_ENABLED=false ./result/bin/paseo daemon run >"$WRAPPER_LOG" 2>&1 &
|
|
DAEMON_PID=$!
|
|
|
|
deadline=$((SECONDS + 30))
|
|
while (( SECONDS < deadline )); do
|
|
if STATUS_JSON="$(./result/bin/paseo daemon status --json)" \
|
|
&& jq -e '.connectedDaemon == "reachable"' <<<"$STATUS_JSON" >/dev/null; then
|
|
echo "$STATUS_JSON"
|
|
curl --fail --silent --show-error http://127.0.0.1:6767/ >"$PASEO_HOME/web-ui.html"
|
|
[[ -s "$PASEO_HOME/web-ui.html" ]]
|
|
if ! TERMINAL_JSON="$(./result/bin/paseo terminal create --cwd "$PASEO_HOME" --name nix-smoke --json)"; then
|
|
break
|
|
fi
|
|
TERMINAL_ID="$(jq -er '.id' <<<"$TERMINAL_JSON")"
|
|
./result/bin/paseo terminal send-keys "$TERMINAL_ID" 'PATH= "$PASEO_HOOK_CLI" --version && printf "nix-terminal-%s\n" ok' Enter
|
|
deadline=$((SECONDS + 15))
|
|
while (( SECONDS < deadline )); do
|
|
if ./result/bin/paseo terminal capture "$TERMINAL_ID" --json \
|
|
| jq -e '.lines | any(. == "nix-terminal-ok")' >/dev/null; then
|
|
./result/bin/paseo terminal kill "$TERMINAL_ID"
|
|
exit 0
|
|
fi
|
|
sleep 1
|
|
done
|
|
echo "Nix terminal did not execute the command."
|
|
break
|
|
fi
|
|
|
|
if ! kill -0 "$DAEMON_PID" 2>/dev/null; then
|
|
echo "Nix daemon exited before becoming reachable."
|
|
break
|
|
fi
|
|
|
|
sleep 1
|
|
done
|
|
|
|
echo "::group::daemon.log"
|
|
cat "$PASEO_HOME/daemon.log" 2>/dev/null || echo "<missing>"
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::paseo daemon run stdout/stderr"
|
|
cat "$WRAPPER_LOG" 2>/dev/null || echo "<missing>"
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::paseo daemon status"
|
|
./result/bin/paseo daemon status || true
|
|
echo "::endgroup::"
|
|
|
|
exit 1
|
|
|
|
- name: Build Nix desktop package
|
|
run: nix build .#desktop -o result-desktop
|
|
|
|
build-desktop-darwin:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: cachix/install-nix-action@v31
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Build Nix desktop package
|
|
run: nix build .#desktop -o result-desktop
|
|
|
|
- name: Verify macOS application bundle
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
app="result-desktop/Applications/Paseo.app"
|
|
test -x "$app/Contents/MacOS/Paseo"
|
|
test -L result-desktop/bin/paseo-desktop
|
|
test "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$app/Contents/Info.plist")" = "sh.paseo.desktop"
|
|
find "$app" -name Info.plist -print0 | xargs -0 -n 1 plutil -lint
|