Skip to content

Commit

Permalink
use diff dir for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
davegarthsimpson committed Jul 2, 2024
1 parent ee3a3e6 commit a14de2a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ env:
# and the companion needs.select-targets.outputs.merge-channel-files property (output values always have string
# type).
mergeable-channel-file: 'false'
# as this runs on a self hosted runner, we need to override the default working directory,
# otherwise paths in the build job will be too long for `light.exe`
working-directory: 'C:\a'
artifacts:
- path: '*Windows_64bit.exe'
name: Windows_X86-64_interactive_installer
Expand Down Expand Up @@ -296,11 +299,15 @@ jobs:
- name: Checkout
if: fromJSON(matrix.config.container) == null
uses: actions/checkout@v4

with:
path: ${{ matrix.config.working-directory }}

- name: Checkout
# actions/checkout@v4 has dependency on a higher version of glibc than available in the Linux container.
if: fromJSON(matrix.config.container) != null
uses: actions/checkout@v3
with:
path: ${{ matrix.config.working-directory }}

- name: Install Node.js
if: fromJSON(matrix.config.container) == null && runner.os != 'Windows'
Expand Down Expand Up @@ -360,6 +367,7 @@ jobs:
CREATE_USERNAME: ${{ secrets.CREATE_USERNAME }}
CREATE_PASSWORD: ${{ secrets.CREATE_PASSWORD }}
CREATE_CLIENT_SECRET: ${{ secrets.CREATE_CLIENT_SECRET }}
working-directory: ${{ matrix.config.working-directory || './' }}
run: |
# See: https://www.electron.build/code-signing
if [ $CAN_SIGN = false ] || [ $IS_WINDOWS_CONFIG = true ]; then
Expand Down Expand Up @@ -389,6 +397,7 @@ jobs:
if: >
needs.select-targets.outputs.merge-channel-files == 'true' &&
matrix.config.mergeable-channel-file == 'true'
working-directory: ${{ matrix.config.working-directory || './' }}
run: |
staged_channel_files_path="${{ runner.temp }}/staged-channel-files"
mkdir "$staged_channel_files_path"
Expand All @@ -408,13 +417,14 @@ jobs:
with:
if-no-files-found: error
name: ${{ env.STAGED_CHANNEL_FILES_ARTIFACT }}
path: ${{ env.STAGED_CHANNEL_FILES_PATH }}
path: ${{ matrix.config.working-directory && format('{0}/{1}', matrix.config.working-directory, env.STAGED_CHANNEL_FILES_PATH) || env.STAGED_CHANNEL_FILES_PATH }}


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

merge-channel-files:
needs:
Expand Down

0 comments on commit a14de2a

Please sign in to comment.