From e616bc5fe467bd2d4c4ddba94f0a8f8e0882a1d3 Mon Sep 17 00:00:00 2001 From: Mindfultime Date: Mon, 5 Oct 2026 20:32:23 +0200 Subject: [PATCH] Remove combined release workflow in favor of platform tags --- .github/workflows/release-platform.yml | 18 +- .github/workflows/release.yml | 245 ------------------------- docs/APPLE_SIGNING.md | 2 +- docs/DISTRIBUTION.md | 92 ++++------ docs/INTEL_MAC_SUPPORT_RESEARCH.md | 2 +- docs/PACKAGE_MANAGER_DISTRIBUTION.md | 34 ++-- docs/RELEASE_GATES_SPEC.md | 24 +++ scripts/release-channel.mjs | 4 +- scripts/test-release-channel.mjs | 10 +- scripts/test-workflows.py | 54 +++--- 10 files changed, 118 insertions(+), 367 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-platform.yml b/.github/workflows/release-platform.yml index 14efc5d..e42bdfb 100644 --- a/.github/workflows/release-platform.yml +++ b/.github/workflows/release-platform.yml @@ -7,10 +7,6 @@ on: description: linux, macos-aarch64, macos-x86_64, or windows-x86_64 required: true type: string - publish-preview: - description: Publish an independent draft preview on a matching protected tag - default: true - type: boolean permissions: contents: read @@ -42,7 +38,6 @@ jobs: id: release env: RELEASE_PLATFORM: ${{ inputs.platform }} - PUBLISH_PREVIEW: ${{ inputs.publish-preview }} shell: bash run: | ./scripts/release-check.sh @@ -55,14 +50,9 @@ jobs: git fetch --no-tags origin main if [ "$GITHUB_EVENT_NAME" = push ]; then channel=$(node scripts/release-channel.mjs "$version" "$GITHUB_REF_NAME") - if [ "$PUBLISH_PREVIEW" = true ]; then - test "$channel" = "$RELEASE_PLATFORM-preview" || { - echo "Tag does not match this platform's preview channel." >&2; exit 1; - } - elif [ "$channel" != desktop ]; then - echo "Complete releases require the synchronized desktop tag." >&2 - exit 1 - fi + test "$channel" = "$RELEASE_PLATFORM-preview" || { + echo "Tag does not match this platform's preview channel." >&2; exit 1; + } if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then echo "Release tag must point to a commit on main." >&2 exit 1 @@ -324,7 +314,7 @@ jobs: # Unselected builders are skipped. Override the implicit success() guard, # but require the selected builder and preflight to succeed, never cancel. if: >- - ${{ !cancelled() && inputs.publish-preview && github.event_name == 'push' && + ${{ !cancelled() && github.event_name == 'push' && needs.preflight.result == 'success' && ((inputs.platform == 'linux' && needs.linux.result == 'success') || (startsWith(inputs.platform, 'macos-') && needs.macos.result == 'success') || diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index ed548b7..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,245 +0,0 @@ -name: Release complete desktop - -on: - push: - tags: - - "v*" - - "!v*-rc.*-linux" - - "!v*-rc.*-macos-aarch64" - - "!v*-rc.*-macos-x86_64" - - "!v*-rc.*-windows-x86_64" - - "!v*-linux-preview.*" - - "!v*-macos-aarch64-preview.*" - - "!v*-macos-x86_64-preview.*" - - "!v*-windows-x86_64-preview.*" - workflow_dispatch: - inputs: - platform: - description: Platform to validate (all builds the complete candidate bundle) - type: choice - default: all - options: - - all - - macos - - windows - - linux - -concurrency: - group: release-${{ github.ref }} - cancel-in-progress: false - -permissions: - contents: read - -env: - CARGO_PACKAGER_VERSION: 0.11.8 - -jobs: - preflight: - runs-on: ubuntu-22.04 - outputs: - channel: ${{ steps.release.outputs.channel }} - permissions: - contents: read - actions: read - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ github.sha }} - fetch-depth: 0 - - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 - with: - node-version: '24' - - name: Install Rust 1.95 - run: | - rustup toolchain install 1.95.0 --profile minimal - rustup default 1.95.0 - - name: Verify release version - id: release - shell: bash - run: | - ./scripts/release-check.sh - version=$(tr -d '[:space:]' < VERSION) - channel=candidate - git fetch --no-tags origin main - if [ "$GITHUB_EVENT_NAME" = push ]; then - channel=$(node scripts/release-channel.mjs "$version" "$GITHUB_REF_NAME") - if [ "$channel" != desktop ]; then - echo "Use the independent platform workflow for preview tags." >&2 - exit 1 - fi - if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then - echo "Release tag must point to a commit on main." >&2 - exit 1 - fi - elif [ "$GITHUB_EVENT_NAME" = workflow_dispatch ] && [ "$GITHUB_REF" != refs/heads/main ]; then - echo "Manual release tests must run from main." >&2 - exit 1 - fi - echo "channel=$channel" >> "$GITHUB_OUTPUT" - - - name: Verify successful main CI for the exact release commit - env: - GH_TOKEN: ${{ github.token }} - run: node scripts/verify-release-ci.mjs - - macos_apple_silicon: - if: github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'macos' - needs: preflight - uses: ./.github/workflows/release-platform.yml - with: - platform: macos-aarch64 - publish-preview: false - secrets: inherit - # Reusable-workflow permission ceiling; build/preflight jobs remain read-only. - permissions: - contents: write - actions: read - id-token: write - attestations: write - artifact-metadata: write - - macos_intel: - if: github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'macos' - needs: preflight - uses: ./.github/workflows/release-platform.yml - with: - platform: macos-x86_64 - publish-preview: false - secrets: inherit - # Reusable-workflow permission ceiling; build/preflight jobs remain read-only. - permissions: - contents: write - actions: read - id-token: write - attestations: write - artifact-metadata: write - - windows: - if: github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'windows' - needs: preflight - uses: ./.github/workflows/release-platform.yml - with: - platform: windows-x86_64 - publish-preview: false - secrets: inherit - # Reusable-workflow permission ceiling; build/preflight jobs remain read-only. - permissions: - contents: write - actions: read - id-token: write - attestations: write - artifact-metadata: write - - linux: - if: github.event_name == 'push' || inputs.platform == 'all' || inputs.platform == 'linux' - needs: preflight - uses: ./.github/workflows/release-platform.yml - with: - platform: linux - publish-preview: false - secrets: inherit - # Reusable-workflow permission ceiling; build/preflight jobs remain read-only. - permissions: - contents: write - actions: read - id-token: write - attestations: write - artifact-metadata: write - - assemble: - if: github.event_name == 'push' || inputs.platform == 'all' - needs: [preflight, macos_apple_silicon, macos_intel, windows, linux] - runs-on: windows-2025 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ github.sha }} - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: mist-* - path: release-assets - merge-multiple: true - - name: Add verified installers and package-manager recipes - shell: pwsh - env: - APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }} - WINDOWS_SIGNER_SHA256: ${{ vars.WINDOWS_SIGNER_SHA256 }} - run: | - $ErrorActionPreference = 'Stop' - if ($env:APPLE_TEAM_ID -cnotmatch '^[A-Z0-9]{10}$') { throw 'APPLE_TEAM_ID must be a 10-character Team ID.' } - if ($env:WINDOWS_SIGNER_SHA256 -notmatch '^[a-fA-F0-9]{64}$') { throw 'WINDOWS_SIGNER_SHA256 must be a certificate SHA-256.' } - $encoding = [Text.UTF8Encoding]::new($false) - $assets = (Resolve-Path release-assets).Path - $shell = [IO.File]::ReadAllText((Resolve-Path scripts/install-release.sh)) - [IO.File]::WriteAllText((Join-Path $assets 'mist-installer.sh'), $shell.Replace("`r`n", "`n").Replace('__MIST_APPLE_TEAM_ID__', $env:APPLE_TEAM_ID), $encoding) - $powershell = [IO.File]::ReadAllText((Resolve-Path scripts/install-release.ps1)) - [IO.File]::WriteAllText((Join-Path $assets 'mist-installer.ps1'), $powershell.Replace('__MIST_WINDOWS_SIGNER_SHA256__', $env:WINDOWS_SIGNER_SHA256.ToUpperInvariant()), $encoding) - Copy-Item assets/mist-orb-512-v1.png (Join-Path $assets 'Mist.png') - function Write-Checksums { - $lines = Get-ChildItem $assets -File | Where-Object Name -ne 'SHA256SUMS' | Sort-Object Name | ForEach-Object { - '{0} {1}' -f (Get-FileHash -Algorithm SHA256 $_.FullName).Hash.ToLowerInvariant(), $_.Name - } - [IO.File]::WriteAllText((Join-Path $assets 'SHA256SUMS'), ($lines -join "`n") + "`n", $encoding) - } - Write-Checksums - $version = (Get-Content VERSION -Raw).Trim() - # Stable and RC recipes point to the same immutable complete release. - if ($version -match '^\d+\.\d+\.\d+(-rc\.[1-9]\d*)?$') { - $packages = Join-Path $env:RUNNER_TEMP 'mist-package-managers' - node scripts/build-package-managers.mjs $version $assets $packages $env:WINDOWS_SIGNER_SHA256 - if ($LASTEXITCODE -ne 0) { throw 'Package recipe generation failed.' } - choco pack (Join-Path $packages 'chocolatey/mist-tts.nuspec') --outputdirectory $assets - if ($LASTEXITCODE -ne 0) { throw 'Chocolatey packaging failed.' } - Copy-Item (Join-Path $packages 'Casks/mist.rb') (Join-Path $assets 'mist.rb') - Write-Checksums - } - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: mist-release-bundle-${{ github.sha }} - path: release-assets - if-no-files-found: error - - publish: - if: github.event_name == 'push' - needs: assemble - runs-on: ubuntu-22.04 - environment: release-publishing - permissions: - contents: write - id-token: write - attestations: write - artifact-metadata: write - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: mist-release-bundle-${{ github.sha }} - path: release-assets - - name: Attest public release artifacts - if: github.event.repository.visibility == 'public' - uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2 - with: - subject-checksums: release-assets/SHA256SUMS - - name: Create draft release - env: - GH_TOKEN: ${{ github.token }} - shell: bash - run: | - release_state=$(gh release view "$GITHUB_REF_NAME" --json isDraft --jq .isDraft 2>/dev/null || true) - if [ "$release_state" = false ]; then - echo "Refusing to replace assets on published release $GITHUB_REF_NAME." >&2 - exit 1 - fi - if [ -z "$release_state" ]; then - release_flags=() - case "$GITHUB_REF_NAME" in - *-*) release_flags+=(--prerelease --latest=false) ;; - esac - gh release create "$GITHUB_REF_NAME" \ - --draft \ - --verify-tag \ - --title "Mist $GITHUB_REF_NAME" \ - --notes "Draft desktop release. Complete the macOS, Windows, X11, and Wayland acceptance checklist before publishing." \ - "${release_flags[@]}" - fi - gh release upload "$GITHUB_REF_NAME" release-assets/* --clobber diff --git a/docs/APPLE_SIGNING.md b/docs/APPLE_SIGNING.md index 58792e7..fb926de 100644 --- a/docs/APPLE_SIGNING.md +++ b/docs/APPLE_SIGNING.md @@ -76,7 +76,7 @@ release notarization”; use it as `APPLE_PASSWORD`, never your primary password ## 5. Enter the values directly in GitHub -Matching Mist's [workflow](../.github/workflows/release.yml), add these under +Matching Mist's [platform workflow](../.github/workflows/release-platform.yml), add these under **Settings → Environments → release-signing → Environment secrets**; retain the reviewer protection in [DISTRIBUTION.md](DISTRIBUTION.md). diff --git a/docs/DISTRIBUTION.md b/docs/DISTRIBUTION.md index 859508a..a1dfbe7 100644 --- a/docs/DISTRIBUTION.md +++ b/docs/DISTRIBUTION.md @@ -1,30 +1,16 @@ # Distribution -Mist publishes immutable, checksum-verified desktop artifacts through GitHub -Releases. Release assets use stable names so the installation commands never -need a version embedded in them. +Mist publishes immutable, checksum-verified desktop artifacts through independent +platform GitHub Releases. Asset names stay consistent; the release tag selects +the version and platform. ## User installation -macOS and Linux: - -```sh -( - set -eu - installer=$(mktemp "${TMPDIR:-/tmp}/mist-bootstrap.XXXXXX") - trap 'rm -f "$installer"' 0 - curl --proto '=https' --tlsv1.2 -LsSf \ - https://github.com/mindful-time/Mist/releases/latest/download/mist-installer.sh \ - --output "$installer" - sh "$installer" -) -``` - -Windows PowerShell: - -```powershell -& ([scriptblock]::Create((irm -ErrorAction Stop https://github.com/mindful-time/Mist/releases/latest/download/mist-installer.ps1))) -``` +Choose an available installer on the [download website](https://mindful-time.github.io/Mist/). +The current version is an early-access release candidate, not a stable release. +For verified command-line installation, use the explicit platform tag shown in +[Independent platform previews](#independent-platform-previews); do not use +`/releases/latest` for an RC. The scripts download `SHA256SUMS` first and reject an artifact whose SHA-256 digest does not match. Users who prefer not to pipe a network response into a @@ -68,14 +54,13 @@ requires a separately built compatible inference runtime and native testing. ## Release asset contract -Every complete desktop release must contain the five platform artifacts listed above, plus: +Each release contains only its selected platform's installers, plus: - `Mist.png` -- `mist-installer.sh` -- `mist-installer.ps1` +- `mist-installer.sh` for macOS/Linux, or `mist-installer.ps1` for Windows - `SHA256SUMS`, covering every downloadable artifact except itself -Changing one of these names is a breaking change for the stable installation +Changing one of these names is a breaking change for the verified installation commands. Add a new asset for another architecture instead of replacing an existing architecture with a differently built binary. @@ -88,7 +73,7 @@ anonymous commands above. Publishing the website is deliberately opt-in. The Pages workflow deploys only from public `main` when the repository variable `DOWNLOAD_SITE_ENABLED` is `true`. Keep it unset or `false` while preparing the first release. After the -complete release passes acceptance testing and is published, enable the +selected platform release passes acceptance testing and is published, enable the variable and run **Actions → Pages → Run workflow**. The site can also be enabled before that milestone: it must honestly show downloads coming soon or a labeled platform preview, never imply unavailable installers exist. This gate prevents future @@ -132,8 +117,8 @@ stable `0.1.0`; the compiled app still identifies as `0.1.0-rc.1`. Each platform can be distributed for early testing as soon as its own build and signing succeed. These independent pipelines share `release-platform.yml`; they do not wait for another platform's release/signing jobs. They still require all -required main CI checks on the exact source commit. This does not weaken or -replace the complete desktop release contract. +required main CI checks on the exact source commit. CI, signing, and publication +protections are unchanged; there is no combined release workflow. | Actions workflow | Example protected tag | Installer assets | | --- | --- | --- | @@ -143,12 +128,12 @@ replace the complete desktop release contract. | Release Windows | `v0.1.0-rc.1-windows-x86_64` | Signed x64 setup EXE | Run the matching workflow manually from `main` to build an Actions candidate -without creating a release. `Release complete desktop` remains an optional -all-platform bundle with Homebrew/Chocolatey recipes, not a prerequisite for -these previews. Its common candidate tag is `v0.1.0-rc.1`; it must not also run -for a platform-suffixed tag. Homebrew and Chocolatey use the same RC package -version. Registry publication remains separate -maintainer steps after the complete release passes acceptance. +without creating a release. Publishing starts only when the matching protected +platform tag is pushed. A common tag such as `v0.1.0-rc.1` starts no release. +Changing `VERSION` alone also starts no release: preflight validates the tag +against synchronized Cargo and macOS version metadata and successful exact-commit +main CI. Homebrew and Chocolatey recipe/feed publication remains separate work; +no combined bundle or package-manager publication is run by these pipelines. 1. Merge the preview workflow/website changes through a PR and wait for all required CI checks on that exact `main` commit. Do not tag the old workflow. @@ -170,7 +155,7 @@ maintainer steps after the complete release passes acceptance. Linux previews require x86_64/AVX2, glibc 2.39+ and GLIBCXX 3.4.32 (Ubuntu 24.04+ or Mint 22+), just like the normal Linux packages. AppImage does not make the application compatible with every Linux distribution. Full acceptance still precedes the stable -desktop release. All main, tag, CI, environment, and signing rules remain intact. +release. All main, tag, CI, environment, and signing rules remain intact. For a preview, use its **explicit tag**, not `/releases/latest` (GitHub excludes prereleases from that endpoint): @@ -340,7 +325,7 @@ existing rulesets; editing a file does not update server configuration. PRs targeting `main` run the read-only CI workflow, including required quality, native builds/tests, and `Linux package validation`. CI builds and validates the Linux production packages without signing secrets. The Release workflow -does not start on PRs; signing, bundle assembly, and publication belong only to +does not start on PRs; signing, platform packaging, and publication belong only to Release. PR artifacts are test candidates, not approved public downloads. Pushes to `main` rerun CI as an integration check; pushes to a PR branch do not start a duplicate CI run. @@ -362,33 +347,32 @@ rerun all CI jobs on that main commit rather than bypassing the release gate. Linux packaging is shared between CI and Release; PR CI cannot call the signing/publishing jobs. -After both signing setups are configured, run **Release complete desktop** with -`all` to build, sign, notarize, -and validate every platform artifact, then upload -`mist-release-bundle-` as a normal Actions artifact. Manual runs do not -create a tag or GitHub Release and cannot publish anything. Tagged releases -of the complete desktop channel require all five packages; platform preview -tags require only their selected platform. Use candidate runs to fix packaging failures -before choosing a version tag. +Manual runs create only that platform's Actions artifacts, not a tag or GitHub +Release. There is no `all` option or cross-platform assembly dependency. Use a +candidate run when troubleshooting packaging before choosing a platform tag. ## Publishing a release 1. Synchronize `VERSION`, `Cargo.toml`, `Cargo.lock`, and the macOS bundle version, then run `./scripts/release-check.sh`. 2. Wait for all required integration-CI checks on the exact commit on `main`, - then complete a successful manual release-candidate run for that commit. -3. Create and push the matching `v` tag. The release workflow packages - each operating system on its native runner and creates or updates a draft - GitHub Release. -4. Confirm every file in the release asset contract is present and matches + and verify the chosen platform's signing prerequisites. +3. Create and push the matching `v-` tag from the table + above. Only that platform packages on its native runner and creates a new + draft prerelease after protected approval. Existing releases are never overwritten. +4. Confirm every file in the selected-platform asset contract is present and matches `SHA256SUMS`. -5. Exercise the draft on clean machines before publishing: +5. Verify metadata, provenance, and required native signing before offering an + explicitly labeled RC for volunteer testing. Complete clean-machine acceptance + before a stable release, covering the relevant platform: - Apple Silicon and Intel macOS: Gatekeeper, first install, update rollback, Accessibility permission, selection, hotkey, model download, and speech. - Windows x64: Authenticode, install, update, uninstall, UI Automation, hotkey, model download, speech, and available GPU/CPU fallbacks. - Linux x64: AppImage and DEB install, desktop entry, X11 and Wayland selection, portals, hotkey, model download, speech, and CPU fallback. -6. Publish the draft only after the acceptance checks pass. Keep a failed draft - private and fix it with a new version instead of replacing an already - published release artifact. +6. Publish a verified RC as a prerelease with `latest=false`; do not claim + unperformed clean-machine acceptance. Keep a failed draft private and use a + new candidate version instead of replacing a published artifact. A future + stable channel requires its own reviewed publication policy; it is not an + implicit all-platform trigger. diff --git a/docs/INTEL_MAC_SUPPORT_RESEARCH.md b/docs/INTEL_MAC_SUPPORT_RESEARCH.md index 18e9da0..089afe8 100644 --- a/docs/INTEL_MAC_SUPPORT_RESEARCH.md +++ b/docs/INTEL_MAC_SUPPORT_RESEARCH.md @@ -164,7 +164,7 @@ runtime files. ([`v1.28.0` license](https://github.com/microsoft/onnxruntime/blo 1. **Native build and regression coverage.** Add ordinary Intel CI alongside ARM and run the project's required checks using the chosen runtime path. [Current CI](../.github/workflows/ci.yml) uses `macos-latest`, while the - [release matrix](../.github/workflows/release.yml) includes + [platform release workflow](../.github/workflows/release-platform.yml) includes `macos-15-intel`. Verify the Rust graph, native archive architecture, requested C API, and runtime version. Record source/dependency checksums, compiler/SDK versions, cache inputs, and build duration. Cross-compilation diff --git a/docs/PACKAGE_MANAGER_DISTRIBUTION.md b/docs/PACKAGE_MANAGER_DISTRIBUTION.md index 56251f0..598f5e7 100644 --- a/docs/PACKAGE_MANAGER_DISTRIBUTION.md +++ b/docs/PACKAGE_MANAGER_DISTRIBUTION.md @@ -51,7 +51,7 @@ desired, the pinned cargo-packager 0.11.8 supports it through the `wix` format. Add and test that output, its signing and release-asset handling explicitly; renaming an EXE is not conversion. ([Mist packaging configuration](../Cargo.toml), -[current release workflow](../.github/workflows/release.yml), +[current platform release workflow](../.github/workflows/release-platform.yml), [cargo-packager formats](https://docs.rs/cargo-packager/0.11.8/cargo_packager/enum.PackageFormat.html)) The reviewed Chocolatey moderation requirements do not state a blanket @@ -70,13 +70,14 @@ no `release-signing` environment secret names. The latest successful Release workflow was a PR run, not publication. These are point-in-time checks, not a claim about credentials the maintainer may possess elsewhere. -The existing workflow requires signing credentials and assembles all platform -artifacts for tagged releases. Its macOS installation script checks codesign, +The workflow inspected on 2026-10-03 required signing credentials and assembled +all platforms. That combined workflow has since been removed: current native +releases are independent. The macOS installation script checks codesign, Gatekeeper and the expected Apple team before installing; its Windows script checks Authenticode and the expected certificate before either installation or download-only completion. The macOS download-only mode checks the checksum, but does not perform those installation-time signature checks. -([Release workflow](../.github/workflows/release.yml), +([Platform release workflow](../.github/workflows/release-platform.yml), [macOS/Linux installer](../scripts/install-release.sh), [Windows installer](../scripts/install-release.ps1), [existing release policy](DISTRIBUTION.md)) @@ -90,13 +91,13 @@ Homebrew selects the ARM/Intel DMG and pins each checksum. Chocolatey pins the EXE checksum and verifies Authenticode plus the exact publisher before silent NSIS installation. No quarantine/Gatekeeper bypass is added. -The complete signed Release candidate assembles `mist.rb` and -`mist-tts..nupkg` alongside the existing installers and includes both -in `SHA256SUMS`. Both stable `x.y.z` and `x.y.z-rc.N` versions generate recipes; -the current shared candidate is `0.1.0-rc.1`. RC recipes reference the complete -candidate tag `v0.1.0-rc.1`, not a stable or missing platform release. Generation and trust -decisions have fixture tests; Windows CI also runs `choco pack`. None of those -fixtures proves a native installer works or a real signature is trusted. +Recipe generation remains a tested standalone preparation tool, not part of the +native release pipelines. Its current templates require a common asset-host tag +and all Mac/Windows installers. Before use with independent platform releases, +adapt and test the generator's version-pinned URLs for those published channels; +do not advertise the currently generated common-tag recipes as installable. +Both stable `x.y.z` and `x.y.z-rc.N` versions have fixture tests; Windows CI also +runs `choco pack`. Fixtures do not prove native installation or real signatures. For a signed candidate downloaded from Actions: @@ -115,8 +116,8 @@ Chocolatey repository publication are not implied by generated recipe files. ## Remaining publication steps -1. Complete Apple signing/notarization and Windows signing setup. Create a - draft candidate through the protected Release workflow. +1. Complete the relevant native signing setup and create that platform's draft + through its protected tag workflow; other platforms do not need to be ready. 2. Test install, upgrade, uninstall, first launch, permissions, hotkey, and speech on clean macOS ARM/Intel, Windows x64, and supported Linux desktops. Specifically test Chocolatey's per-user install using the same Windows @@ -124,7 +125,8 @@ Chocolatey repository publication are not implied by generated recipe files. pass. Chocolatey's default uninstaller discovers registry changes, so also confirm it tracks only Mist. ([automatic uninstaller](https://docs.chocolatey.org/en-us/choco/features/auto-uninstaller/)) -3. After acceptance, publish the immutable signed assets. Create the proposed +3. Adapt and validate the package generator against the independent published + signed installers, then choose the tap/feed setup. After acceptance, create the proposed `mindful-time/homebrew-tap`, copy the generated cask to `Casks/mist.rb`, and validate it with Homebrew before advertising `brew install --cask mindful-time/tap/mist`. @@ -157,5 +159,5 @@ MSI packaging is not part of this change. An unsigned public tester preview would require an explicitly approved, separate preview flow; it must not silently weaken the stable-release checks. -A macOS-first public release would likewise require changing the current -all-platform publication contract. Neither policy change was made here. +The current independent native RC flow is documented in +[DISTRIBUTION.md](DISTRIBUTION.md); it does not publish a tap or community package. diff --git a/docs/RELEASE_GATES_SPEC.md b/docs/RELEASE_GATES_SPEC.md index 55259f8..42ffc39 100644 --- a/docs/RELEASE_GATES_SPEC.md +++ b/docs/RELEASE_GATES_SPEC.md @@ -193,3 +193,27 @@ Clarified on 2026-10-05: all native installers, Homebrew, and Chocolatey use blockers; no unsigned Mac/Windows release or false package-manager commands. - Submit version/pipeline/site changes through a PR. Leave its merge to the owner and do not create candidate tags against the old main workflow. + +## Platform-only release cleanup + +Requested on 2026-10-05: remove the optional combined release path because each +platform is released independently. Review only this cleanup against merged +main `861cea1be412ee46271c49d194a131ab36bdd520`. This supersedes the earlier +requirements to preserve the optional complete desktop workflow and common-tag +package assembly, not any CI, signing, owner-merge, or publication protection. + +- Remove `.github/workflows/release.yml` and the shared builder's unused + combined-publication switch. Keep the four platform workflows and the + same-commit reusable builder; do not duplicate their native build logic. +- Only matching protected platform tags may prepare a public draft RC. A common + RC/stable tag is not a release channel. Version metadata is validation, not + an automatic publication trigger. Manual platform runs remain artifact-only + diagnostics; PRs cannot call signing or publication. +- Preserve exact-commit seven-job main CI, version synchronization, native + signing/notarization, protected review, attestations, selected-platform asset + validation, draft-only creation, and refusal to overwrite existing releases. +- Update the existing CLI tag and actual-YAML regression boundaries and active + documentation. Keep historical website discovery compatibility. No application + code, credentials, server rules, tags, published assets, tap, or feed changes + are part of this cleanup. Future stable channels and independent package-manager + recipes are separate work, not a hidden common release trigger. diff --git a/scripts/release-channel.mjs b/scripts/release-channel.mjs index ce66510..fc87654 100644 --- a/scripts/release-channel.mjs +++ b/scripts/release-channel.mjs @@ -5,13 +5,11 @@ const candidate = tag?.match(/^v(\d+\.\d+\.\d+-rc\.[1-9]\d*)-(linux|macos-aarch6 if (extra.length || !/^\d+\.\d+\.\d+(?:[+-][0-9A-Za-z.-]+)?$/.test(version ?? '')) { console.error('A synchronized release version and tag are required.'); process.exitCode = 1; -} else if (tag === `v${version}`) { - console.log('desktop'); } else if (candidate?.[1] === version) { console.log(`${candidate[2]}-preview`); } else if (/^\d+\.\d+\.\d+$/.test(version) && preview?.[1] === version) { console.log(`${preview[2]}-preview`); } else { - console.error(`Tag must match v${version}, a matching release-candidate platform tag, or a supported stable-base preview tag.`); + console.error(`Tag must identify a platform and match version ${version}: use a release-candidate platform tag or a supported stable-base preview tag.`); process.exitCode = 1; } diff --git a/scripts/test-release-channel.mjs b/scripts/test-release-channel.mjs index c9b652c..ce1a79b 100644 --- a/scripts/test-release-channel.mjs +++ b/scripts/test-release-channel.mjs @@ -17,10 +17,9 @@ for (const platform of ['linux', 'macos-aarch64', 'macos-x86_64', 'windows-x86_6 }); } -test('the shared release-candidate tag selects the complete desktop bundle', () => { +test('a common RC tag cannot select an all-platform release', () => { const result = spawnSync(process.execPath, [command, '0.1.0-rc.1', 'v0.1.0-rc.1'], { encoding: 'utf8' }); - assert.equal(result.status, 0, result.stderr); - assert.equal(result.stdout.trim(), 'desktop'); + assert.notEqual(result.status, 0); }); test('Linux preview tags are distinct from the complete desktop release', () => { @@ -37,10 +36,9 @@ for (const platform of ['macos-aarch64', 'macos-x86_64', 'windows-x86_64']) { }); } -test('the synchronized version still selects the complete desktop release', () => { +test('a common stable tag cannot select an all-platform release', () => { const result = spawnSync(process.execPath, [command, '0.1.0', 'v0.1.0'], { encoding: 'utf8' }); - assert.equal(result.status, 0, result.stderr); - assert.equal(result.stdout.trim(), 'desktop'); + assert.notEqual(result.status, 0); }); for (const tag of ['v0.2.0', 'v0.2.0-linux-preview.1', 'v0.1.0-linux-preview.0', diff --git a/scripts/test-workflows.py b/scripts/test-workflows.py index 3f512e1..9c84be0 100644 --- a/scripts/test-workflows.py +++ b/scripts/test-workflows.py @@ -79,13 +79,13 @@ def test_preview_publication_expression_fails_closed_for_failed_or_skipped_selec expression = workflow("release-platform.yml")["jobs"]["publish_preview"]["if"] for platform, selected in [("linux", "linux"), ("macos-aarch64", "macos"), ("macos-x86_64", "macos"), ("windows-x86_64", "windows")]: - for preflight, build, cancelled, publishing, event in product( + for preflight, build, cancelled, event in product( ["success", "failure", "skipped", "cancelled"], ["success", "failure", "skipped", "cancelled"], - [False, True], [False, True], ["push", "workflow_dispatch"] + [False, True], ["push", "workflow_dispatch"] ): values = { - "cancelled()": repr(cancelled), "inputs.publish-preview": repr(publishing), + "cancelled()": repr(cancelled), "github.event_name": repr(event), "inputs.platform": repr(platform), "needs.preflight.result": repr(preflight), **{f"needs.{name}.result": repr(build if name == selected else "skipped") @@ -97,29 +97,26 @@ def test_preview_publication_expression_fails_closed_for_failed_or_skipped_selec actual = actual.replace("&&", "and").replace("||", "or").replace("!", "not ") actual = " ".join(actual.split()) result = eval(actual, {"__builtins__": {}, "startsWith": str.startswith}) - expected = not cancelled and publishing and event == "push" and preflight == "success" and build == "success" - self.assertEqual(result, expected, (platform, preflight, build, cancelled, publishing, event)) - - def test_complete_release_reuses_platform_builds_without_duplicate_preview_publication(self): - config = workflow("release.yml") - jobs = config["jobs"] - for name, platform in [("macos_apple_silicon", "macos-aarch64"), ("macos_intel", "macos-x86_64"), - ("linux", "linux"), ("windows", "windows-x86_64")]: - self.assertEqual(jobs[name]["uses"], "./.github/workflows/release-platform.yml") - self.assertEqual(jobs[name]["with"], {"platform": platform, "publish-preview": False}) - self.assertEqual(jobs[name]["needs"], "preflight") - self.assertIn(name, jobs["assemble"]["needs"]) - self.assertNotIn("publish_linux_preview", jobs) - tags = events(config)["push"]["tags"] - for platform in ["linux", "macos-aarch64", "macos-x86_64", "windows-x86_64"]: - self.assertIn(f"!v*-{platform}-preview.*", tags) - self.assertIn(f"!v*-rc.*-{platform}", tags) + expected = not cancelled and event == "push" and preflight == "success" and build == "success" + self.assertEqual(result, expected, (platform, preflight, build, cancelled, event)) + + def test_only_the_four_platforms_can_start_release_work(self): + entry_points = { + file.name for file in (ROOT / ".github/workflows").glob("release*.yml") + if "push" in events(workflow(file.name)) + } + self.assertEqual(entry_points, { + "release-linux.yml", "release-macos-aarch64.yml", + "release-macos-x86_64.yml", "release-windows-x86_64.yml", + }) + shared = events(workflow("release-platform.yml")) + self.assertEqual(set(shared), {"workflow_call"}) + self.assertEqual(set(shared["workflow_call"]["inputs"]), {"platform"}) def test_preview_keeps_ci_and_publication_protection(self): jobs = workflow("release-platform.yml")["jobs"] preview = jobs["publish_preview"] self.assertEqual(preview["environment"], "release-publishing") - self.assertIn("inputs.publish-preview", preview["if"]) self.assertIn("github.event_name == 'push'", preview["if"]) downloads = [step for step in preview["steps"] if step.get("uses", "").startswith("actions/download-artifact@")] self.assertEqual(downloads[0]["with"]["name"], "mist-${{ inputs.platform == 'linux' && 'linux-x86_64' || inputs.platform }}") @@ -155,10 +152,13 @@ def test_intel_build_is_required_and_uses_the_same_runtime_as_release(self): def test_prs_run_ci_without_starting_a_release(self): ci = events(workflow("ci.yml")) - release = events(workflow("release.yml")) - self.assertNotIn("pull_request", release) - self.assertEqual(release["push"]["tags"][0], "v*") - self.assertIn("workflow_dispatch", release) + for file in (ROOT / ".github/workflows").glob("release*.yml"): + release = events(workflow(file.name)) + self.assertNotIn("pull_request", release) + self.assertNotIn("pull_request_target", release) + if "push" in release: + self.assertNotIn("branches", release["push"]) + self.assertIn("workflow_dispatch", release) self.assertEqual(ci["pull_request"]["branches"], ["main"]) self.assertEqual(ci["push"], {"branches": ["main"]}) @@ -183,7 +183,7 @@ def test_linux_package_validation_remains_required_in_read_only_ci(self): self.assertNotIn("Linux release packages", names) def test_release_artifacts_require_exact_commit_ci_without_rerunning_tests(self): - for file in ["release.yml", "release-platform.yml"]: + for file in ["release-platform.yml"]: jobs = workflow(file)["jobs"] self.assertNotIn("quality", jobs) gate = jobs["preflight"] @@ -204,7 +204,7 @@ def test_release_artifacts_require_exact_commit_ci_without_rerunning_tests(self) self.assertTrue(any("scripts/check-quality.sh" in step.get("run", "") for step in quality_steps)) def test_every_release_checkout_is_pinned_to_the_event_commit(self): - for file in ["release.yml", "release-platform.yml"]: + for file in ["release-platform.yml"]: for name, job in workflow(file)["jobs"].items(): for step in job.get("steps", []): if step.get("uses", "").startswith("actions/checkout@"):