Skip to content

Commit 475455f

Browse files
committed
[+] Build bun step
1 parent e23ad47 commit 475455f

File tree

1 file changed

+22
-29
lines changed

1 file changed

+22
-29
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,28 @@ jobs:
1414
- name: Check out code
1515
uses: actions/checkout@v3
1616

17+
- name: Setup Bun
18+
uses: oven-sh/setup-bun@v2
19+
with:
20+
bun-version: latest
21+
22+
- name: Build frontend for deployment
23+
run: |
24+
cd rooms
25+
bun install
26+
VITE_WL_BUILD_PROD=true bun run build
27+
28+
- name: Upload pages build
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: rooms/dist
32+
33+
- name: Build frontend for embedding
34+
run: |
35+
cd rooms
36+
bun run build
37+
cp dist/combined.html ../src/main/resources/
38+
1739
- name: Setup .NET 8.x
1840
uses: actions/setup-dotnet@v4
1941
with:
@@ -42,26 +64,6 @@ jobs:
4264

4365
- name: Build fat JAR
4466
run: ./gradlew clean buildFatJar
45-
# Or if you are using Shadow plugin:
46-
# run: ./gradlew clean shadowJar
47-
48-
# Example jpackage step:
49-
- name: Build Windows .exe with jpackage
50-
# jpackage is available by default in the Java 17 distribution on Ubuntu,
51-
# but note you need to specify --type exe on Windows. On Ubuntu, you can cross-compile
52-
# for Windows using the --win-* flags only if you have the right cross-toolchain set up.
53-
# Typically, you'd run this step on Windows if you want an actual .exe.
54-
# For demonstration, here's how you'd do it on a Windows runner:
55-
if: runner.os == 'Windows'
56-
run: |
57-
jpackage \
58-
--type exe \
59-
--name "WorldLinkD" \
60-
--input .\build\libs \
61-
--main-jar "worldlinkd.jar" \
62-
--main-class "aquadx.ApplicationKt" \
63-
--java-options "-Xmx512m" \
64-
--win-console
6567

6668
- name: Release
6769
uses: softprops/action-gh-release@v2
@@ -76,12 +78,3 @@ jobs:
7678
mod/bin/Release/net472/WorldLink.dll
7779
mod/WorldLink.toml
7880
token: ${{ secrets.GITHUB_TOKEN }}
79-
80-
- name: Upload EXE to Release
81-
if: runner.os == 'Windows'
82-
uses: actions/upload-release-asset@v1
83-
with:
84-
upload_url: ${{ steps.create_release.outputs.upload_url }}
85-
asset_path: "WorldLinkD-1.0.exe" # adjust if different output file
86-
asset_name: "WorldLinkD-installer.exe" # or any naming convention you want
87-
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)