From 54a95aa40729df630df652ef8c06a83e04c49b7f Mon Sep 17 00:00:00 2001 From: sh0tx420 <55631215+sh0tx420@users.noreply.github.com> Date: Sun, 15 Sep 2024 17:15:55 +0300 Subject: [PATCH] feat(ci): Support Windows & Linux platforms --- .github/workflows/main.yml | 13 +++++-------- package.json | 3 ++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 68cec8c..1a6b677 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,10 +7,7 @@ on: jobs: build-and-release: - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} + runs-on: "ubuntu-latest" permissions: contents: write steps: @@ -22,11 +19,11 @@ jobs: - run: bun install - - run: bun run compile + - run: | + bun run compile_win32 + bun run compile_linux - name: Create Release uses: ncipollo/release-action@v1 with: - artifacts: | - "./build/srvinstaller" - "./build/srvinstaller.exe" + artifacts: "./build/srvinstaller,./build/srvinstaller_win32.exe,sources.json" diff --git a/package.json b/package.json index 90d1d8a..aa577f9 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ }, "scripts": { "start": "bun run src/main.ts", - "compile": "bun build --compile --minify --sourcemap ./src/main.ts --outfile ./build/srvinstaller" + "compile_win32": "bun build ./src/main.ts --compile --target=bun-windows-x64 --minify --outfile ./build/srvinstaller_win32", + "compile_linux": "bun build ./src/main.ts --compile --target=bun-linux-x64 --minify --outfile ./build/srvinstaller" }, "type": "module", "dependencies": {