build(release): drop macOS updater zip/blockmap from published assets

Unsigned builds ship manual downloads only, so the macOS auto-update zip
(~187MB) and the blockmaps just clutter the release page and dev artifacts.

- release-desktop.yml: stop attaching *.zip / *.blockmap to the GitHub
  Release; users now see DMG/exe/AppImage/deb + install-macos-unsigned.sh.
- build-desktop-dev.yml: stop collecting *.zip / *.blockmap into the dev
  artifact for the same reason.
- electron-builder still produces dmg+zip and the whole updater-metadata
  pipeline (latest*.yml merge/validate) is untouched, so auto-update can be
  re-enabled later by restoring the two asset globs.
- sync release-workflow.test.ts dev-artifact assertion accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
程序员阿江(Relakkes) 2026-06-03 23:30:04 +08:00
parent 98b79ce51a
commit 8dc7a73586
3 changed files with 6 additions and 6 deletions

View File

@ -122,7 +122,7 @@ jobs:
STAGING="desktop/build-artifacts/ci-Claude-Code-Haha-v${{ steps.version.outputs.version }}-${{ matrix.artifact_name }}"
mkdir -p "$STAGING"
find desktop/build-artifacts/electron -maxdepth 1 -type f \
\( -name "*.dmg" -o -name "*.exe" -o -name "*.deb" -o -name "*.AppImage" -o -name "*.zip" -o -name "*.blockmap" -o -name "*.yml" \) \
\( -name "*.dmg" -o -name "*.exe" -o -name "*.deb" -o -name "*.AppImage" -o -name "*.yml" \) \
| while read -r artifact; do
cp -f "$artifact" "$STAGING/"
done

View File

@ -431,10 +431,8 @@ jobs:
fail_on_unmatched_files: true
files: |
artifacts/release-assets/**/*.dmg
artifacts/release-assets/**/*.zip
artifacts/release-assets/**/*.exe
artifacts/release-assets/**/*.AppImage
artifacts/release-assets/**/*.deb
artifacts/release-assets/**/*.blockmap
artifacts/update-metadata-standard/*.yml
desktop/scripts/install-macos-unsigned.sh

View File

@ -47,15 +47,17 @@ describe('release desktop workflow', () => {
}
})
test('development desktop artifacts exclude unpacked macOS app bundles', () => {
test('development desktop artifacts exclude unpacked macOS app bundles and updater-only files', () => {
const workflow = readFileSync('.github/workflows/build-desktop-dev.yml', 'utf8')
const collectStep = workflow.match(
/- name: Collect artifacts[\s\S]*?(?:\n\s{6}- name:|$)/,
)?.[0]
expect(collectStep).toContain('*.dmg')
expect(collectStep).toContain('*.zip')
expect(collectStep).toContain('*.blockmap')
// The macOS auto-update zip and blockmaps are not collected: unsigned builds
// ship manual downloads only, so the artifact stays the installer + script.
expect(collectStep).not.toContain('*.zip')
expect(collectStep).not.toContain('*.blockmap')
expect(collectStep).toContain('*.yml')
expect(collectStep).toContain('install-macos-unsigned.sh')
expect(collectStep).toContain('[ "${{ matrix.smoke_platform }}" = "macos" ]')