Skip to content

ci(release): consolidate GitHub approval and retain SignPath review / 合并 GitHub 审批并保留 SignPath 手工确认#6626

Merged
SivanCola merged 4 commits into
esengine:main-v2from
SivanCola:feature/single-approval-release
Jul 17, 2026
Merged

ci(release): consolidate GitHub approval and retain SignPath review / 合并 GitHub 审批并保留 SignPath 手工确认#6626
SivanCola merged 4 commits into
esengine:main-v2from
SivanCola:feature/single-approval-release

Conversation

@SivanCola

@SivanCola SivanCola commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a stable release orchestrator that validates the CLI, npm, and Desktop tags against the current main-v2 commit
  • request the protected GitHub release environment once, then invoke all three publishers in parallel
  • retain manual SignPath confirmation for the AMD64 and ARM64 Windows signing requests
  • preserve one GitHub approval for standalone prerelease/recovery runs and keep canary dispatches approval-free
  • require orchestrated publishers to run from a protected caller ref whose workflow SHA matches the approved release commit
  • check out the approved SHA and revalidate every remote release tag immediately before publication
  • validate release inputs before shell use, add release workflow contract tests, and update the release runbook

Why

A stable release currently starts three independent workflows, each with its own GitHub environment deployment. This change consolidates those GitHub approvals into one reviewed stable release decision while preserving recovery and prerelease paths. SignPath remains an independent second-party control and continues to require manual confirmation for Windows release signing.

Approval behavior

  • GitHub: one release-environment approval starts the CLI, npm, and Desktop stable publishers.
  • SignPath: Use approval process remains enabled on release-signing; the AMD64 and ARM64 requests can each require a manual confirmation.

Compatibility

Surface Result
Stable tag names Unchanged: vX.Y.Z, npm-vX.Y.Z, and desktop-vX.Y.Z
Stable tag push The three tags must now be pushed atomically
Standalone prereleases Still supported with one GitHub release approval
Canary dispatches Still approval-free
SignPath release signing Manual approval retained for both Windows architectures
Persisted data and public APIs No changes

Security model

  • The supported orchestrated path rejects unprotected caller refs and workflow commits that differ from the approved SHA.
  • Every publisher builds the approved SHA and fails if its release tag moves before publication.
  • Repository write access remains privileged because the current publication credentials are repository-level Actions secrets. Strict separation from repository writers requires a follow-up migration to protected environment secrets or provider-side OIDC/trusted publishing.

Verification

  • bash scripts/release-workflows.test.sh
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 on the release workflows
  • ./scripts/cache-guard.sh
  • node --test scripts/release-notes.test.mjs
  • go test ./...
  • git diff --check

Problem:
Stable CLI, npm, and Desktop tags started independent workflows, so one stable release required repeated GitHub environment approvals and separate coordination.

Root cause:
Each publisher owned its stable tag trigger and protected environment instead of sharing one validated release decision.

Fix:
Add a stable release orchestrator that validates the atomic three-tag set, requests one environment approval, and invokes guarded reusable publishers in parallel. Preserve standalone prerelease and recovery gates, harden version resolution, and add workflow contract coverage and release documentation.

Verification:
- actionlint v1.7.7 on release workflows and CI
- bash scripts/release-workflows.test.sh
- ./scripts/cache-guard.sh
- node --test scripts/release-notes.test.mjs
- go test ./...
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development updater Auto-update / installer / release packaging labels Jul 17, 2026
Problem:
The reusable publishers trusted a caller path on any ref, rebuilt mutable tags after approval, and the new actionlint gate failed on an unquoted keychain list.

Root cause:
The orchestrator passed tag names but not its approved commit, while child guards did not require a protected caller ref or matching workflow SHA. The macOS keychain command also relied on shell word splitting.

Fix:
Require protected caller context, propagate the approved CLI tag and SHA, check out the immutable commit, and revalidate remote tags before publication. Preserve keychain arguments with a Bash array and document the repository-write trust boundary.

Verification:
- bash scripts/release-workflows.test.sh
- go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 on all release workflows
- ./scripts/cache-guard.sh
- node --test scripts/release-notes.test.mjs
- go test ./...
- git diff --check
Problem:
The release workflow contract test passed locally but failed in GitHub Actions because the lint runner does not provide ripgrep.

Root cause:
The test script used rg only for simple regular-expression assertions even though CI does not install that optional tool.

Fix:
Use portable grep -E assertions throughout the release workflow contract test.

Verification:
- env PATH=/usr/bin:/bin:/usr/sbin:/sbin bash scripts/release-workflows.test.sh
- go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 on all release workflows
- git diff --check
Context:
The release workflow now consolidates GitHub environment approval, while SignPath manual confirmations remain an intentional second-party control.

Change:
Clarify workflow comments and the release runbook so the one-approval claim applies only to GitHub. Document that the AMD64 and ARM64 signing requests can each require manual SignPath confirmation.

Verification:
- bash scripts/release-workflows.test.sh
- go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 on all release workflows
- git diff --check
@SivanCola SivanCola changed the title ci(release): orchestrate stable publishing behind one approval / 稳定版发布改为单次审批 ci(release): consolidate GitHub approval and retain SignPath review / 合并 GitHub 审批并保留 SignPath 手工确认 Jul 17, 2026
@SivanCola
SivanCola marked this pull request as ready for review July 17, 2026 18:33
@SivanCola
SivanCola requested a review from esengine as a code owner July 17, 2026 18:33
@SivanCola
SivanCola merged commit 3637d0f into esengine:main-v2 Jul 17, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

updater Auto-update / installer / release packaging v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant