From c6d37f7e093c0f8799127309960f595c362087fa Mon Sep 17 00:00:00 2001 From: Riprod <131838720+ItsRiprod@users.noreply.github.com> Date: Sun, 7 Jul 2024 03:04:00 -0400 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 51 ++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0bdb9a2..a097312 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,24 +38,51 @@ jobs: cd ./DeskThingServer npm run build - - name: Build application for ${{ matrix.os }} + + - name: Build application for Windows + if: runner.os == 'Windows' run: | cd ./DeskThingServer - if [[ "${{ matrix.os }}" == "windows-latest" ]]; then - npm run build:win - elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then - npm run build:mac - else - npm run build:linux - fi - - - name: Upload artifact + npm run build:win + + - name: Build application for macOS + if: runner.os == 'macOS' + run: | + cd ./DeskThingServer + npm run build:mac + + - name: Build application for Linux + if: runner.os == 'Linux' + run: | + cd ./DeskThingServer + npm run build:linux + + - name: Upload artifact for Windows + if: runner.os == 'Windows' + uses: actions/upload-artifact@v3 + with: + name: DeskThing-windows-latest # Artifact name for Windows + path: | + ./DeskThingServer/dist/* + !./DeskThingServer/dist/**/*.map + + - name: Upload artifact for macOS + if: runner.os == 'macOS' + uses: actions/upload-artifact@v3 + with: + name: DeskThing-macos-latest # Artifact name for macOS + path: | + ./DeskThingServer/dist/* + !./DeskThingServer/dist/**/*.map + + - name: Upload artifact for Linux + if: runner.os == 'Linux' uses: actions/upload-artifact@v3 with: - name: DeskThing-${{ matrix.os }} # Artifact name based on OS + name: DeskThing-ubuntu-latest # Artifact name for Linux path: | ./DeskThingServer/dist/* - !./DeskThingServer/dist/**/*.map # Uploads build outputs + !./DeskThingServer/dist/**/*.map release: needs: build # Runs after build job