Skip to content

Commit fc1e5fc

Browse files
Copilotlmangani
andcommitted
Upload macOS DMG to GitHub Release on release events
Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
1 parent 2d31e66 commit fc1e5fc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/build-mac-dmg.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,20 @@ jobs:
8989
# --prepackaged skips the build phase; electron-builder only creates the DMG.
9090
# CSC_IDENTITY_AUTO_DISCOVERY=false prevents any re-signing attempt.
9191
env:
92-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9392
CSC_IDENTITY_AUTO_DISCOVERY: "false"
9493
run: |
95-
PUBLISH_MODE="never"
96-
if [ "${{ github.event_name }}" = "release" ]; then
97-
PUBLISH_MODE="always"
98-
fi
99-
10094
pnpm exec electron-builder --mac dmg \
10195
--prepackaged "${{ steps.build-app.outputs.app_path }}" \
10296
--config.mac.notarize=false \
10397
--config.publish.owner=${{ github.repository_owner }} \
10498
--config.publish.repo=${{ github.event.repository.name }} \
105-
--publish "$PUBLISH_MODE"
99+
--publish never
100+
101+
- name: Upload DMG to GitHub Release
102+
if: github.event_name == 'release'
103+
env:
104+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
run: gh release upload "${{ github.event.release.tag_name }}" release/*.dmg --clobber
106106

107107
- name: Upload DMG artifact
108108
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)