Skip to content

v1.1.4: 模板文件持久化、步骤指示器重设计、舰船自动补全、编队配置 #36

v1.1.4: 模板文件持久化、步骤指示器重设计、舰船自动补全、编队配置

v1.1.4: 模板文件持久化、步骤指示器重设计、舰船自动补全、编队配置 #36

Workflow file for this run

name: Build & Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
prerelease:
description: '标记为预发布'
required: false
type: boolean
default: false
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout frontend
uses: actions/checkout@v4
- name: Determine version
id: version
shell: pwsh
run: |
if ("${{ github.ref_type }}" -eq "tag") {
$ver = "${{ github.ref_name }}" -replace '^v', ''
} else {
$pkg = Get-Content package.json | ConvertFrom-Json
$ver = $pkg.version
}
echo "VERSION=$ver" >> $env:GITHUB_OUTPUT
echo "Resolved version: $ver"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Sync package.json version
shell: pwsh
run: |
$pkg = Get-Content package.json | ConvertFrom-Json
$pkg.version = "${{ steps.version.outputs.VERSION }}"
$pkg | ConvertTo-Json -Depth 10 | Set-Content package.json -Encoding UTF8
- name: Build & Package
run: npm run dist
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: List release artifacts
shell: pwsh
run: Get-ChildItem -Path release -Recurse -File | Select-Object FullName, Length
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.VERSION }}
name: AutoWSGR-GUI v${{ steps.version.outputs.VERSION }}
prerelease: ${{ github.event.inputs.prerelease == 'true' }}
generate_release_notes: true
files: |
release/*-Setup-*.exe
body: |
## AutoWSGR-GUI v${{ steps.version.outputs.VERSION }}
### 使用方法
1. 下载 `AutoWSGR-GUI-Setup-*.exe`(安装版)
2. 软件已内置 Python 3.12,无需单独安装
3. 首次运行时程序会自动安装 Python 依赖(需联网)
### 系统要求
- Windows 10/11 x64
- 网络连接(首次运行需安装 pip 依赖)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}