This commit is contained in:
yisier
2026-01-20 16:20:37 +08:00
parent f59595e137
commit 2bd015c29f
4 changed files with 73 additions and 5 deletions
+67
View File
@@ -73,3 +73,70 @@ jobs:
npc_sdk.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_npc_gui:
runs-on: ${{ matrix.os }}
needs: build_assets
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux/amd64
artifact: linux_amd64
- os: windows-latest
platform: windows/amd64
artifact: windows_amd64
- os: macos-latest
platform: darwin/amd64
artifact: darwin_amd64
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Enable Yarn (corepack)
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Install frontend deps
run: |
cd cmd/npc/npc-gui/frontend
yarn install --frozen-lockfile
- name: Install Wails CLI
run: |
go install github.com/wailsapp/wails/v2/cmd/wails@latest
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Build Wails app
run: |
cd cmd/npc/npc-gui
$(go env GOPATH)/bin/wails build -platform ${{ matrix.platform }}
shell: bash
- name: Package build output
run: |
cd cmd/npc/npc-gui/build/bin
tar -czvf ../../../npc_gui_${{ matrix.artifact }}.tar.gz ./*
ls -la ../../../npc_gui_${{ matrix.artifact }}.tar.gz
shell: bash
- name: Upload npc-gui artifact
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: cmd/npc/npc-gui/npc_gui_${{ matrix.artifact }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "npc-gui",
"name": "npc-client",
"type": "module",
"version": "1.0.0",
"scripts": {
+5 -4
View File
@@ -10,18 +10,19 @@
"dev:serverUrl": "http://localhost:34115"
},
"author": {
"name": "NPS Team"
"name": "NPS"
},
"info": {
"productName": "NPS Client",
"productVersion": "1.0.0",
"productVersion": "0.26.29",
"companyName": "NPS",
"copyright": "Copyright © 2024 NPS"
"copyright": "Copyright © 2026 NPS"
},
"build": {
"nsis": {
"oneShotInstaller": true,
"allowToChangeInstallationDirectory": true
"allowToChangeInstallationDirectory": true,
"icon": "build/windows/icon.ico"
},
"windows": {
"icon": "build/windows/icon.ico"