Files
yinghuoapi/.goreleaser.yaml
shaw e6add93ae3 fix(build): add -tags embed to ensure frontend is embedded
- Add -tags=embed flag to GoReleaser builds
- Add -tags embed flag to Dockerfile builds
- Fix Dockerfile COPY order to prevent frontend dist being overwritten
- Update README build instructions with embed tag explanation
2025-12-20 19:13:26 +08:00

86 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: 2
project_name: sub2api
before:
hooks:
- go mod tidy -C backend
builds:
- id: sub2api
dir: backend
main: ./cmd/server
binary: sub2api
flags:
- -tags=embed
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s -w
- -X main.Commit={{.Commit}}
- -X main.Date={{.Date}}
- -X main.BuildType=release
archives:
- id: default
format: tar.gz
name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
format_overrides:
- goos: windows
format: zip
files:
- LICENSE*
- README*
- deploy/*
checksum:
name_template: 'checksums.txt'
algorithm: sha256
changelog:
# 禁用自动 changelog完全使用 tag 消息
disable: true
release:
github:
owner: Wei-Shaw
name: sub2api
draft: false
prerelease: auto
name_template: "Sub2API {{.Version}}"
# 完全使用 tag 消息作为 release 内容(通过环境变量传入)
header: |
> AI API Gateway Platform - 将 AI 订阅配额分发和管理
{{ .Env.TAG_MESSAGE }}
footer: |
---
## 📥 Installation
**One-line install (Linux):**
```bash
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bash
```
**Manual download:**
Download the appropriate archive for your platform from the assets below.
## 📚 Documentation
- [GitHub Repository](https://github.com/Wei-Shaw/sub2api)
- [Installation Guide](https://github.com/Wei-Shaw/sub2api/blob/main/deploy/README.md)