Skip to content

feat: automate CLI release distribution - #1904

Merged
tamirdresher merged 10 commits into
devfrom
squad/1593-automate-distribution-updates
Sep 2, 2026
Merged

tamirdresher merged 10 commits into
devfrom
squad/1593-automate-distribution-updates

Conversation

@tamirdresher

@tamirdresher tamirdresher commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Automate immutable insider and preview releases from dev, plus stable releases promoted directly to main.
  • Publish npm packages and standalone GitHub assets for every channel.
  • Publish channel-specific Homebrew casks and WinGet packages for stable, preview, and insider builds.
  • Remove npx as a recommended Squad CLI usage option from current user-facing docs.
  • Harden version validation, checksum verification, idempotent reruns, and external credential handling.

Release behavior

  • dev insider: manual X.Y.Z-insider.N snapshot to GitHub prerelease, npm insider, standalone archives, Homebrew squad-insider, and WinGet bradygaster.Squad.Insider.
  • dev preview: manual X.Y.Z-preview.N release to GitHub prerelease, npm preview, standalone archives, Homebrew squad-preview, and WinGet bradygaster.Squad.Preview.
  • main stable: promoted X.Y.Z release to GitHub latest, npm latest, standalone archives, Homebrew squad, and WinGet bradygaster.Squad.

Validation

  • npm exec -- vitest run test/packaging-manifests.test.ts test/standalone-build.test.ts test/standalone-release-workflow.test.ts test/publish-policy.test.ts
  • npm run lint:docs
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 .github/workflows/squad-insider-publish.yml .github/workflows/squad-standalone-release.yml
  • SKIP_BUILD_BUMP=1 npm run build
  • Generated stable, preview, and insider manifests; winget validate accepted the insider manifest set.

Closes #1593

⚠️ Needs squad member review before merging.

Copilot AI added 2 commits August 27, 2026 14:11
Closes #1593

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Closes #1593

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🔒 Security Review

🔒 Security review: 17 warning(s), 8 info.

Severity Category Finding Location
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-insider-publish.yml:231
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-insider-publish.yml:232
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-release.yml:210
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-release.yml:223
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-release.yml:224
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-standalone-release.yml:419
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-standalone-release.yml:443
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-standalone-release.yml:561
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-standalone-release.yml:619
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-standalone-release.yml:626
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-standalone-release.yml:714
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-standalone-release.yml:726
🟡 warning secrets-reference Non-standard secret reference in workflow — verify this secret is necessary and scoped correctly. .github/workflows/squad-standalone-release.yml:734
🟡 warning pii-env-var Environment variable with sensitive name pattern (CREDENTIALS) — ensure this isn't hardcoded. .github/workflows/squad-standalone-release.yml:444
🟡 warning pii-env-var Environment variable with sensitive name pattern (CREDENTIALS) — ensure this isn't hardcoded. .github/workflows/squad-standalone-release.yml:620
🟡 warning pii-env-var Environment variable with sensitive name pattern (CREDENTIALS) — ensure this isn't hardcoded. .github/workflows/squad-standalone-release.yml:715
🟡 warning pii-env-var Environment variable with sensitive name pattern (CREDENTIALS) — ensure this isn't hardcoded. .github/workflows/squad-standalone-release.yml:727
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-insider-publish.yml:186
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-insider-publish.yml:228
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-npm-publish.yml:246
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-npm-publish.yml:368
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-promote.yml:18
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-release.yml:205
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-release.yml:206
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-release.yml:207

Automated security review — informational only.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Impact Analysis — PR #1904

Risk tier: 🔴 CRITICAL

📊 Summary

Metric Count
Files changed 42
Files added 1
Files modified 40
Files deleted 1
Modules touched 9

🎯 Risk Factors

  • 42 files changed (21-50 → HIGH)
  • 9 modules touched (>8 → CRITICAL)
  • 1 file(s) deleted

📦 Modules Affected

ci-workflows (7 files)
  • .github/workflows/squad-ci.yml
  • .github/workflows/squad-insider-publish.yml
  • .github/workflows/squad-npm-publish.yml
  • .github/workflows/squad-preview.yml
  • .github/workflows/squad-promote.yml
  • .github/workflows/squad-release.yml
  • .github/workflows/squad-standalone-release.yml
copilot-config (1 file)
  • .copilot/skills/release-process/SKILL.md
docs (17 files)
  • docs/_internal/release-checklist.md
  • docs/src/content/docs/cookbook/recipes.md
  • docs/src/content/docs/features/standalone-install.md
  • docs/src/content/docs/features/vscode.md
  • docs/src/content/docs/get-started/five-minute-start.md
  • docs/src/content/docs/get-started/install-comprehensive.md
  • docs/src/content/docs/get-started/installation.md
  • docs/src/content/docs/get-started/migration.md
  • docs/src/content/docs/guide.md
  • docs/src/content/docs/guide/contributing.md
  • docs/src/content/docs/guide/personal-squad.md
  • docs/src/content/docs/insider-program.md
  • docs/src/content/docs/reference/cli.md
  • docs/src/content/docs/scenarios/production-troubleshooting.md
  • docs/src/content/docs/scenarios/release-process.md
  • docs/src/content/docs/scenarios/troubleshooting.md
  • docs/src/content/docs/tour-first-session.md
root (3 files)
  • .changeset/automate-release-distribution.md
  • README.md
  • README.zh.md
scripts (2 files)
  • scripts/generate-packaging.mjs
  • scripts/install.sh
squad-cli (3 files)
  • packages/squad-cli/README.md
  • packages/squad-cli/templates/skills/release-process/SKILL.md
  • packages/squad-cli/templates/skills/versioning-policy/SKILL.md
squad-sdk (2 files)
  • packages/squad-sdk/templates/skills/release-process/SKILL.md
  • packages/squad-sdk/templates/skills/versioning-policy/SKILL.md
squad-state (2 files)
  • .squad/skills/release-process/SKILL.md
  • .squad/skills/versioning-policy/SKILL.md
tests (5 files)
  • test/cli/watch-capabilities.test.ts
  • test/packaging-manifests.test.ts
  • test/publish-policy.test.ts
  • test/standalone-build.test.ts
  • test/standalone-release-workflow.test.ts

This report is generated automatically for every PR. See #733 for details.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Squad File Leakage Detected

The following .squad/ files were modified in this PR:

  • .squad/skills/release-process/SKILL.md
  • .squad/skills/versioning-policy/SKILL.md

These files affect team routing, agent charters, and decisions.
If intentional, ensure approval from the team lead.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit f62b388

PR Scope: 🔧 Infrastructure

⚠️ 2 item(s) to address before review

Status Check Details
❌ Single commit 10 commits — consider squashing before review
✅ Not in draft Ready for review
✅ Branch up to date Up to date with dev
❌ Copilot review No Copilot review yet — it may still be processing
✅ Changeset present Changeset file found
✅ Scope clean ⚠️ PR includes 2 .squad/ file(s) — ensure these are intentional
✅ No merge conflicts No merge conflicts
✅ Copilot threads resolved 0 active Copilot thread(s) resolved (3 outdated skipped)
✅ CI passing All checks passing

Files Changed (42 files, +3540 −2445)

File +/−
.changeset/automate-release-distribution.md +6 −0
.copilot/skills/release-process/SKILL.md +71 −503
.github/workflows/squad-ci.yml +35 −2
.github/workflows/squad-insider-publish.yml +67 −2
.github/workflows/squad-npm-publish.yml +191 −36
.github/workflows/squad-preview.yml +0 −59
.github/workflows/squad-promote.yml +102 −75
.github/workflows/squad-release.yml +132 −24
.github/workflows/squad-standalone-release.yml +591 −34
.squad/skills/release-process/SKILL.md +159 −152
.squad/skills/versioning-policy/SKILL.md +123 −119
README.md +35 −9
README.zh.md +29 −4
docs/_internal/release-checklist.md +80 −122
docs/src/content/docs/cookbook/recipes.md +4 −1
docs/src/content/docs/features/standalone-install.md +22 −23
docs/src/content/docs/features/vscode.md +4 −1
docs/src/content/docs/get-started/five-minute-start.md +7 −7
docs/src/content/docs/get-started/install-comprehensive.md +5 −204
docs/src/content/docs/get-started/installation.md +194 −81
docs/src/content/docs/get-started/migration.md +14 −14
docs/src/content/docs/guide.md +15 −8
docs/src/content/docs/guide/contributing.md +24 −18
docs/src/content/docs/guide/personal-squad.md +3 −1
docs/src/content/docs/insider-program.md +33 −8
docs/src/content/docs/reference/cli.md +9 −5
docs/src/content/docs/scenarios/production-troubleshooting.md +4 −3
docs/src/content/docs/scenarios/release-process.md +114 −282
docs/src/content/docs/scenarios/troubleshooting.md +23 −34
docs/src/content/docs/tour-first-session.md +3 −3
packages/squad-cli/README.md +52 −7
packages/squad-cli/templates/skills/release-process/SKILL.md +159 −152
packages/squad-cli/templates/skills/versioning-policy/SKILL.md +123 −119
packages/squad-sdk/templates/skills/release-process/SKILL.md +159 −152
packages/squad-sdk/templates/skills/versioning-policy/SKILL.md +123 −119
scripts/generate-packaging.mjs +69 −18
scripts/install.sh +31 −16
test/cli/watch-capabilities.test.ts +22 −1
test/packaging-manifests.test.ts +40 −0
test/publish-policy.test.ts +18 −11
test/standalone-build.test.ts +9 −0
test/standalone-release-workflow.test.ts +636 −16

Total: +3540 −2445


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

⚠️ Architectural review: 1 warning(s).

Severity Category Finding Files
🟡 warning sweeping-refactor This PR touches 42 files (41 modified/added, 1 deleted). Large PRs are harder to review — consider splitting if possible. —

Automated architectural review — informational only.

Copilot AI and others added 4 commits August 27, 2026 20:53
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tamirdresher

Copy link
Copy Markdown
Collaborator Author

CI note: the release/package-manager checks and all targeted tests pass. The full test job is currently blocked by two pre-existing time-dependent assertions in test/cli/watch-capabilities.test.ts.

Both tests create a same-day retrospective and expect retro not due, while RetroCapability intentionally forces a retrospective every Friday after 14:00 UTC. The dev run passed earlier today before that cutoff; this PR's first run and one rerun both failed after the cutoff with the same two assertions. This branch does not change the test or implementation. I left that unrelated issue out of this release-distribution PR.

Copilot and others added 2 commits August 28, 2026 22:31
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tamirdresher
tamirdresher marked this pull request as ready for review August 28, 2026 20:23
Copilot AI lite review requested due to automatic review settings August 28, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It significantly restructures release/publish GitHub Actions workflows and distribution channels, so a human maintainer should validate the end-to-end release behavior despite only minor doc issues found.

Review tier: Lite
Findings: 3 Low severity

New issues introduced by this change (3)
Severity Finding
Low severity docs/​src/​content/​docs/​features/​standalone-install.md — The packaging section hard-codes the generated Homebrew filename as…
Low severity docs/​src/​content/​docs/​features/​standalone-install.md — This section says Homebrew/WinGet publication runs only for stable releases, but the standalone…
Low severity docs/​src/​content/​docs/​scenarios/​troubleshooting.md — The Installation guide link target omits the .md extension (../get-started/installation).…
What changed in this PR

This PR implements an automated, multi-channel distribution pipeline for the Squad CLI: insider and preview releases from dev, plus stable releases promoted to main, with artifacts published via npm and as standalone GitHub Release assets, and with Homebrew/WinGet packaging support. It also updates user-facing docs to stop recommending npx as the primary way to run Squad and to document the new installation/update options.

Changes:

  • Hardened standalone installer checksum verification and expanded standalone/release packaging tests.
  • Added release-channel-aware packaging manifest generation (Homebrew casks + WinGet identifiers) for stable/preview/insider versions.
  • Reworked GitHub Actions release workflows to support preview/insider/stable automation and updated documentation/runbooks accordingly.
File Description
test/​standalone-build.test.ts Adds assertions for stricter checksum/download/ordering behavior in install.sh.
test/​publish-policy.test.ts Improves the publish-policy lint matching logic and expands good/bad/ignored cases.
test/​packaging-manifests.test.ts Adds tests for channel-specific Homebrew/WinGet outputs and new channel metadata helpers.
test/​cli/​watch-capabilities.test.ts Stabilizes RetroCapability time-based behavior with fake timers and adds a Friday-afternoon regression test.
scripts/​install.sh Makes checksum verification mandatory and fails fast on malformed/missing checksums.
scripts/​generate-packaging.mjs Introduces stable/preview/insider channel mapping and generates channel-specific Homebrew/WinGet manifests + filenames.
README.zh.md Documents new install/update options (npm/Homebrew/WinGet/script/archive) and removes npx guidance.
README.md Documents new install/update options and switches watch examples from npx to squad.
packages/​squad-sdk/​templates/​skills/​versioning-policy/​SKILL.md Updates versioning policy to cover stable/preview/insider/local builds and prerelease dependency floors.
packages/​squad-sdk/​templates/​skills/​release-process/​SKILL.md Rewrites release runbook for automated insider/preview/stable channels and dev→main promotion.
packages/​squad-cli/​templates/​skills/​versioning-policy/​SKILL.md Same versioning-policy updates for CLI templates.
packages/​squad-cli/​templates/​skills/​release-process/​SKILL.md Same release-process updates for CLI templates.
packages/​squad-cli/​README.md Updates prerequisites and adds non-npm installation paths (Homebrew/WinGet/install script).
docs/​src/​content/​docs/​tour-first-session.md Removes direct npm install instructions in favor of the installation guide.
docs/​src/​content/​docs/​scenarios/​troubleshooting.md Updates troubleshooting to reference the installation guide and removes legacy npx github: guidance.
docs/​src/​content/​docs/​scenarios/​release-process.md Replaces three-branch model docs with automated channel workflows and recovery guidance.
docs/​src/​content/​docs/​scenarios/​production-troubleshooting.md Updates container entrypoint guidance to use squad instead of npx @bradygaster/squad-cli.
docs/​src/​content/​docs/​reference/​cli.md Expands installation section to include Homebrew/WinGet and points to the installation guide.
docs/​src/​content/​docs/​insider-program.md Updates insider program to include GitHub prereleases + Homebrew/WinGet distribution.
docs/​src/​content/​docs/​guide/​personal-squad.md Updates portability guidance to reflect non-npm install methods.
docs/​src/​content/​docs/​guide/​contributing.md Updates Node.js requirements and explains changesets vs release-version lockstep.
docs/​src/​content/​docs/​guide.md Updates requirements/install/upgrade guidance to reflect standalone and package-manager options.
docs/​src/​content/​docs/​get-started/​migration.md Updates migration prereqs and CI snippet to Node 22 and removes npx-based guidance.
docs/​src/​content/​docs/​get-started/​installation.md Major rewrite to document all install/update methods and shared .squad/ state behavior.
docs/​src/​content/​docs/​get-started/​install-comprehensive.md Collapses duplicated install docs into a single pointer to the canonical installation guide.
docs/​src/​content/​docs/​get-started/​five-minute-start.md Updates quickstart to assume squad command is installed (no npx).
docs/​src/​content/​docs/​features/​vscode.md Clarifies Node.js is only required for npm installs and links to the installation guide.
docs/​src/​content/​docs/​features/​standalone-install.md Updates install script URL to main, documents packaging generation, and CI usage for bundles.
docs/​src/​content/​docs/​cookbook/​recipes.md Updates release-process recipe to match the new dev→main promotion model.
docs/​_internal/​release-checklist.md Updates internal checklist for automated insider/preview/stable workflows and recovery steps.
.squad/​skills/​versioning-policy/​SKILL.md Updates canonical versioning policy to include preview/insider channels and dependency-floor rules.
.squad/​skills/​release-process/​SKILL.md Updates canonical release runbook to match automated channels and new recovery commands.
.github/​workflows/​squad-release.yml Adds channel-aware validation, creates prerelease vs latest appropriately, and invokes npm + standalone publication workflows.
.github/​workflows/​squad-promote.yml Replaces dev→preview→main promotion with a sanitized dev→main promotion that explicitly dispatches the stable release.
.github/​workflows/​squad-preview.yml Removes the preview-branch validation workflow (preview is now a channel, not a branch).
.github/​workflows/​squad-npm-publish.yml Adds workflow_call inputs, validates versions/channels, makes publication idempotent, and enforces workspace prerelease dependency rules.
.github/​workflows/​squad-insider-publish.yml Captures source SHA, creates an immutable insider prerelease, and invokes standalone packaging publication.
.github/​workflows/​squad-ci.yml Updates CI branch targeting (dev/main) and strengthens version/dependency-floor checks and publish-policy detection.
.copilot/​skills/​release-process/​SKILL.md Slims Copilot-facing release guidance to point at the canonical runbook and new channel model.
.changeset/​automate-release-distribution.md Adds a patch changeset for CLI+SDK to reflect release automation and guidance changes.
Suppressed comments (1)

docs/src/content/docs/scenarios/troubleshooting.md:29

  • The inline Installation guide link target omits the .md extension (../get-started/installation). For consistency with other docs links (and to avoid a likely broken relative link), this should point to installation.md.
**Fix:** Install Squad through npm, Homebrew, WinGet, the verified install
script, or a release archive, then run `squad init`. See the
[Installation guide](../get-started/installation).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tamirdresher
tamirdresher merged commit 5ee4688 into dev Sep 2, 2026
18 checks passed
@bradygaster
bradygaster deleted the squad/1593-automate-distribution-updates branch September 9, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: non-npm distribution for squad-cli — gh-aw activation shouldn't require registry.npmjs.org

4 participants