Skip to content

Commit

Permalink
Disable hard links in build workflows
Browse files Browse the repository at this point in the history
electron-builder has some logic that uses hard links instead of copies
on macOS and Linux, but only in CI by default
(see node_modules/builder-util/out/fs.js -> _isUseHardLink)
which then causes errors related to files already existing.

Anyways, the performance of a link over a copy is unimportant to our build workflows,
so we'll just force real copies so it actually works.
  • Loading branch information
GarboMuffin committed Jan 22, 2024
1 parent 60ce6e4 commit bc715d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
- name: Package macOS
if: runner.os == 'macOS'
run: node release-automation/build.js --mac
env:
USE_HARD_LINKS: "false"
- name: Package Linux
if: runner.os == 'Linux'
run: node release-automation/build.js --debian --tarball --appimage
env:
USE_HARD_LINKS: "false"
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
run: node release-automation/build.js --production --mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: "false"
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
Expand All @@ -60,3 +61,4 @@ jobs:
run: node release-automation/build.js --production --debian --tarball --appimage
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: "false"

0 comments on commit bc715d3

Please sign in to comment.