mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
- 导入 Windows 特定的库,如 systray 和 toast - 更新 go.mod 和 go.sum 文件以包含新库 - 修改 App.d.ts 和 App.js 以支持 Windows 功能 - 更新 GitHub Actions以构建 Windows 版本 - 优化 Windows 平台上的浏览器检查逻辑
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
name: Wails build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
# Match any new tag
|
|
- '*-release'
|
|
|
|
env:
|
|
# Necessary for most environments as build failure can occur due to OOM issues
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
OFFICIAL_STATEMENT: ${{ vars.OFFICIAL_STATEMENT }}
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
# Failure in one platform build won't impact the others
|
|
fail-fast: false
|
|
matrix:
|
|
build:
|
|
- name: 'go-stock-windows-amd64.exe'
|
|
platform: 'windows/amd64'
|
|
os: 'windows-latest'
|
|
- name: 'go-stock-windows-universal.exe'
|
|
platform: 'windows/universal'
|
|
os: 'windows-latest'
|
|
# - name: 'go-stock-linux-amd64'
|
|
# platform: 'linux/amd64'
|
|
# os: 'ubuntu-latest'
|
|
- name: 'App'
|
|
platform: 'darwin/universal'
|
|
os: 'macos-latest'
|
|
|
|
runs-on: ${{ matrix.build.os }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Get commit message
|
|
id: get_commit_message
|
|
run: |
|
|
$commit_message = & git log -1 --pretty=format:"%s"
|
|
echo "::set-output name=commit_message::$commit_message"
|
|
|
|
- name: Build wails x go-stock
|
|
uses: ArvinLovegood/wails-build-action@v3.5
|
|
id: build
|
|
with:
|
|
build-name: ${{ matrix.build.name }}
|
|
build-platform: ${{ matrix.build.platform }}
|
|
package: true
|
|
go-version: '1.24'
|
|
build-tags: ${{ github.ref_name }}
|
|
build-commit-message: ${{ steps.get_commit_message.outputs.commit_message }}
|
|
build-statement: ${{ env.OFFICIAL_STATEMENT }}
|
|
node-version: '20.x'
|