act #46
Workflow file for this run
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
name: releaser | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
NODE_OPTIONS: "--max-old-space-size=4096" # 增加 Node.js 可用的最大内存,防止构建失败 | |
jobs: | |
build-server: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
- name: Set up dependencies | |
run: sudo apt-get update && sudo apt-get install gcc musl-dev -y | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CGO_ENABLED: 0 | |
GOOS: linux | |
GOARCH: amd64 | |
LDFLAGS: '-extldflags "-static"' | |
build-client: | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [ | |
{ name: gpp, platform: linux/amd64, os: ubuntu-latest }, | |
{ name: gpp, platform: windows/amd64, os: windows-latest }, | |
{ name: gpp, platform: darwin/universal, os: macos-latest } | |
] | |
runs-on: ${{ matrix.build.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: dAppServer/[email protected] | |
with: | |
build-name: ${{ matrix.build.name }} | |
build-platform: ${{ matrix.build.platform }} | |
go-version: '1.23' |