Skip to content

Commit 201e7cd

Browse files
authored
ci(release): Merge artifacts for Craft release discovery (#1249)
## Problem Craft requires a single artifact named with the commit SHA containing all release files at the root level. The current workflow uploads separate artifacts (`built-packages`, `spotlight-binaries`, `electron-binaries`) with custom names, causing Craft to fail with: ``` Error: Can't find any artifacts for revision "aee365d..." ``` Additionally, the `electron-mac` job may still be running when Craft attempts to publish, causing the `electron-binaries` artifact to be missing. ## Solution Add a `merge-artifacts` job that: 1. Waits for both `build` and `electron-mac` jobs to complete 2. Downloads and flattens all artifacts using `merge-multiple: true` 3. Uploads them as a single artifact named with the commit SHA ## Changes - **build.yml**: Add `merge-artifacts` job at the end of the workflow - **.craft.yml**: Update `statusProvider` context to `Merge Artifacts` and update `requireNames` to match flattened file patterns
1 parent 2cda3f3 commit 201e7cd

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.craft.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ statusProvider:
1616
name: github
1717
config:
1818
contexts:
19-
- "Build"
19+
- "Merge Artifacts"
2020

2121
requireNames:
22-
- /^built-packages$/
23-
- /^spotlight-binaries$/
24-
- /^electron-binaries$/
22+
- /^spotlight-/
23+
- /\.dmg$/
2524

2625
targets:
2726
- name: npm

.github/workflows/build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,22 @@ jobs:
406406
packages/spotlight/dist-electron/*.zip
407407
packages/spotlight/dist-electron/*.blockmap
408408
packages/spotlight/dist-electron/*.yml
409+
410+
merge-artifacts:
411+
name: Merge Artifacts
412+
needs: [build, electron-mac]
413+
if: always() && needs.build.result == 'success' && needs.electron-mac.result == 'success'
414+
runs-on: ubuntu-latest
415+
steps:
416+
- name: Download release artifacts
417+
uses: actions/download-artifact@v5
418+
with:
419+
pattern: '{built-packages,spotlight-binaries,electron-binaries}'
420+
path: artifacts/
421+
merge-multiple: true
422+
423+
- name: Upload merged artifact
424+
uses: actions/upload-artifact@v5
425+
with:
426+
name: ${{ github.sha }}
427+
path: artifacts/

0 commit comments

Comments
 (0)