mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
在 GitHub Actions 的构建配置中添加了 build-tags 参数,使其等于当前的引用名称(github.ref_name)。这允许我们在构建过程中使用特定的标记。 - 修改了 .github/workflows/main.yml 文件- 在 build-platform 部分添加了 build-tags 参数 - 参数值设置为当前引用名称,增加了构建的灵活性和可追溯性
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Wails build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
# Match any new tag
|
|
- '*'
|
|
|
|
env:
|
|
# Necessary for most environments as build failure can occur due to OOM issues
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
|
|
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-linux-amd64'
|
|
# platform: 'linux/amd64'
|
|
# os: 'ubuntu-latest'
|
|
|
|
runs-on: ${{ matrix.build.os }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Build wails
|
|
uses: ArvinLovegood/wails-build-action@v2.4
|
|
id: build
|
|
with:
|
|
build-name: ${{ matrix.build.name }}
|
|
build-platform: ${{ matrix.build.platform }}
|
|
package: true
|
|
go-version: '1.23'
|
|
build-tags: ${{ github.ref_name }}
|