Skip to content

Commit a14de2a

Browse files
use diff dir for windows
1 parent ee3a3e6 commit a14de2a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/build.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ env:
7272
# and the companion needs.select-targets.outputs.merge-channel-files property (output values always have string
7373
# type).
7474
mergeable-channel-file: 'false'
75+
# as this runs on a self hosted runner, we need to override the default working directory,
76+
# otherwise paths in the build job will be too long for `light.exe`
77+
working-directory: 'C:\a'
7578
artifacts:
7679
- path: '*Windows_64bit.exe'
7780
name: Windows_X86-64_interactive_installer
@@ -296,11 +299,15 @@ jobs:
296299
- name: Checkout
297300
if: fromJSON(matrix.config.container) == null
298301
uses: actions/checkout@v4
299-
302+
with:
303+
path: ${{ matrix.config.working-directory }}
304+
300305
- name: Checkout
301306
# actions/checkout@v4 has dependency on a higher version of glibc than available in the Linux container.
302307
if: fromJSON(matrix.config.container) != null
303308
uses: actions/checkout@v3
309+
with:
310+
path: ${{ matrix.config.working-directory }}
304311

305312
- name: Install Node.js
306313
if: fromJSON(matrix.config.container) == null && runner.os != 'Windows'
@@ -360,6 +367,7 @@ jobs:
360367
CREATE_USERNAME: ${{ secrets.CREATE_USERNAME }}
361368
CREATE_PASSWORD: ${{ secrets.CREATE_PASSWORD }}
362369
CREATE_CLIENT_SECRET: ${{ secrets.CREATE_CLIENT_SECRET }}
370+
working-directory: ${{ matrix.config.working-directory || './' }}
363371
run: |
364372
# See: https://www.electron.build/code-signing
365373
if [ $CAN_SIGN = false ] || [ $IS_WINDOWS_CONFIG = true ]; then
@@ -389,6 +397,7 @@ jobs:
389397
if: >
390398
needs.select-targets.outputs.merge-channel-files == 'true' &&
391399
matrix.config.mergeable-channel-file == 'true'
400+
working-directory: ${{ matrix.config.working-directory || './' }}
392401
run: |
393402
staged_channel_files_path="${{ runner.temp }}/staged-channel-files"
394403
mkdir "$staged_channel_files_path"
@@ -408,13 +417,14 @@ jobs:
408417
with:
409418
if-no-files-found: error
410419
name: ${{ env.STAGED_CHANNEL_FILES_ARTIFACT }}
411-
path: ${{ env.STAGED_CHANNEL_FILES_PATH }}
420+
path: ${{ matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.STAGED_CHANNEL_FILES_PATH) || env.STAGED_CHANNEL_FILES_PATH }}
421+
412422

413423
- name: Upload [GitHub Actions]
414424
uses: actions/upload-artifact@v3
415425
with:
416426
name: ${{ env.JOB_TRANSFER_ARTIFACT }}
417-
path: ${{ env.BUILD_ARTIFACTS_PATH }}
427+
path: ${{ matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.BUILD_ARTIFACTS_PATH) || env.BUILD_ARTIFACTS_PATH }}
418428

419429
merge-channel-files:
420430
needs:

0 commit comments

Comments
 (0)