Skip to content

Commit 26aa840

Browse files
committed
feat/ci: Migrate from Node/NPM to Bun
1 parent 5503eb7 commit 26aa840

File tree

6 files changed

+1509
-9582
lines changed

6 files changed

+1509
-9582
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,35 @@ jobs:
4545
run: |
4646
sudo apt-get update
4747
sudo apt-get install -y libudev-dev libusb-1.0-0-dev
48-
- name: Set up Node.js
49-
uses: actions/setup-node@v5
50-
with:
51-
node-version: "24"
52-
cache: "npm"
48+
- name: Set up Bun
49+
uses: oven-sh/setup-bun@v2
5350
- name: Set up Go
5451
uses: actions/setup-go@v5
5552
with:
5653
go-version: "stable"
5754
cache-dependency-path: "guest_server/go.sum"
5855
- name: Install dependencies
59-
run: npm ci
56+
run: bun ci
6057
- name: Build guest server and app
61-
run: npm run build:linux-gs
58+
run: bun run build:linux-gs
6259
env:
6360
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6461
- name: Derive artifact naming
6562
id: meta
6663
shell: bash
6764
run: |
68-
node -e "const p=require('./package.json'); console.log('NAME='+p.name)" >> "$GITHUB_OUTPUT"
69-
node -e "const p=require('./package.json'); console.log('VERSION='+p.version)" >> "$GITHUB_OUTPUT"
65+
bun -e "const p=require('./package.json'); console.log('NAME='+p.name)" >> "$GITHUB_OUTPUT"
66+
bun -e "const p=require('./package.json'); console.log('VERSION='+p.version)" >> "$GITHUB_OUTPUT"
7067
ARCH_FROM_FILE=$(ls dist/*.{AppImage,deb,rpm,tar.gz} 2>/dev/null | head -n1 | xargs -I{} basename {} | sed -E 's/.*-([A-Za-z0-9_]+)\.[^.]+$/\1/')
7168
if [ -n "$ARCH_FROM_FILE" ]; then
7269
echo "ARCH=$ARCH_FROM_FILE" >> "$GITHUB_OUTPUT"
7370
else
74-
NODE_ARCH=$(node -p "process.arch")
75-
case "$NODE_ARCH" in
71+
BUN_ARCH=$(bun -p "process.arch")
72+
case "$BUN_ARCH" in
7673
x64) echo "ARCH=x86_64" >> "$GITHUB_OUTPUT" ;;
7774
arm64) echo "ARCH=arm64" >> "$GITHUB_OUTPUT" ;;
7875
arm) echo "ARCH=armv7l" >> "$GITHUB_OUTPUT" ;;
79-
*) echo "ARCH=$NODE_ARCH" >> "$GITHUB_OUTPUT" ;;
76+
*) echo "ARCH=$BUN_ARCH" >> "$GITHUB_OUTPUT" ;;
8077
esac
8178
fi
8279
- name: Upload AppImage
@@ -170,20 +167,17 @@ jobs:
170167
run: |
171168
sudo apt-get update
172169
sudo apt-get install -y libudev-dev libusb-1.0-0-dev
173-
- name: Set up Node.js
174-
uses: actions/setup-node@v5
175-
with:
176-
node-version: "24"
177-
cache: "npm"
170+
- name: Set up Bun
171+
uses: oven-sh/setup-bun@v2
178172
- name: Set up Go
179173
uses: actions/setup-go@v5
180174
with:
181175
go-version: "stable"
182176
cache-dependency-path: "guest_server/go.sum"
183177
- name: Install dependencies
184-
run: npm ci
178+
run: bun ci
185179
- name: Build guest server and app
186-
run: npm run build:linux-gs
180+
run: bun run build:linux-gs
187181
env:
188182
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
189183
- name: Zip unpacked variant

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,20 @@ You can download the latest Linux builds under the [Releases](https://github.com
8888
8989
## Building WinBoat
9090
91-
- For building you need to have NodeJS and Go installed on your system
91+
- For building you need to have Bun and Go installed on your system
9292
- Clone the repo (`git clone https://github.com/TibixDev/WinBoat`)
93-
- Install the dependencies (`npm i`)
94-
- Build the app and the guest server using `npm run build:linux-gs`
93+
- Install the dependencies (`bun i`)
94+
- Build the app and the guest server using `bun run build:linux-gs`
9595
- You can now find the built app under `dist` with an AppImage and an Unpacked variant
9696
9797
## Running WinBoat in development mode
9898
9999
- Make sure you meet the [prerequisites](#prerequisites)
100-
- Additionally, for development you need to have NodeJS and Go installed on your system
100+
- Additionally, for development you need to have Bun and Go installed on your system
101101
- Clone the repo (`git clone https://github.com/TibixDev/WinBoat`)
102-
- Install the dependencies (`npm i`)
103-
- Build the guest server (`npm run build:gs`)
104-
- Run the app (`npm run dev`)
102+
- Install the dependencies (`bun i`)
103+
- Build the guest server (`bun run build:gs`)
104+
- Run the app (`bun run dev`)
105105
106106
## Contributing
107107

build-guest-server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "Building guest server..."
77
export GOOS=windows
88
export GOARCH=amd64
99
export PACKAGE=winboat-server
10-
export VERSION="$(node -p "require('./package.json').version")"
10+
export VERSION="$(bun -p "require('./package.json').version")"
1111
export COMMIT_HASH="$(git rev-parse --short HEAD)"
1212
export BUILD_TIMESTAMP=$(date '+%Y-%m-%dT%H:%M:%S')
1313
export LDFLAGS=(

0 commit comments

Comments
 (0)