Skip to content

Commit b7139ef

Browse files
fix GitHub Actions release workflow to collect artifacts from all platforms
The workflow was failing to find distribution files because: - Each OS build ran in isolation (matrix strategy) - Release step ran in each job but only had that platform's artifacts - No artifact sharing between jobs Changes: - Added artifact upload step after each platform build - Created separate release job that depends on all builds - Release job downloads all artifacts and creates unified release - Set merge-multiple: true to combine artifacts from all platforms
1 parent 8077935 commit b7139ef

1 file changed

Lines changed: 32 additions & 5 deletions

File tree

.github/workflows/electron.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,32 @@ jobs:
8383
fi
8484
shell: bash
8585

86+
# Upload artifacts from this platform
87+
- name: Upload build artifacts
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: dist-${{ matrix.os }}
91+
path: |
92+
dist/*.exe
93+
dist/*.dmg
94+
dist/*.deb
95+
dist/*.AppImage
96+
dist/*.zip
97+
retention-days: 1
98+
if-no-files-found: warn
99+
100+
release:
101+
needs: build
102+
runs-on: ubuntu-latest
103+
if: github.event_name == 'workflow_dispatch' || github.ref_type == 'tag' || github.ref == 'refs/heads/electron'
104+
105+
steps:
106+
- name: Download all artifacts
107+
uses: actions/download-artifact@v4
108+
with:
109+
path: dist-combined
110+
merge-multiple: true
111+
86112
# Create Release
87113
- name: Create Release
88114
uses: softprops/action-gh-release@v2
@@ -94,10 +120,11 @@ jobs:
94120
# For tag pushes, name the release as "Release <tagname>", otherwise "Electron Release".
95121
name: ${{ (github.event_name == 'push' && github.ref_type == 'tag') && format('Release {0}', github.ref_name) || 'Electron Release' }}
96122
files: |
97-
dist/*.exe
98-
dist/*.dmg
99-
dist/*.deb
100-
dist/*.AppImage
101-
dist/*.zip
123+
dist-combined/*.exe
124+
dist-combined/*.dmg
125+
dist-combined/*.deb
126+
dist-combined/*.AppImage
127+
dist-combined/*.zip
128+
overwrite_files: true
102129
env:
103130
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)