forked from PrismarineJS/prismarine-web-client
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build and Bundle | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-bundle: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build project | ||
run: pnpm build | ||
|
||
- name: Bundle server.js | ||
run: | | ||
pnpm esbuild server.js --bundle --platform=node --outfile=bundled-server.js | ||
- name: Create distribution package | ||
run: | | ||
mkdir -p package | ||
cp -r dist package/ | ||
cp bundled-server.js package/server.js | ||
cd package | ||
zip -r ../dist-package.zip . | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist-package | ||
path: dist-package.zip |