mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 05:56:46 +08:00
docs: 测试新的构建
This commit is contained in:
parent
d5e2c15333
commit
3c8511e91f
12
.github/conf/.goreleaser.yml
vendored
12
.github/conf/.goreleaser.yml
vendored
@ -1,5 +1,5 @@
|
||||
# 项目名称
|
||||
project_name: "{{ .Env.PROJECT_NAME }}"
|
||||
# 项目名称 - 使用默认值或环境变量
|
||||
project_name: "{{ .Env.PROJECT_NAME | default .ProjectName }}"
|
||||
|
||||
# 构建前钩子
|
||||
before:
|
||||
@ -97,8 +97,8 @@ changelog:
|
||||
# 发布配置
|
||||
release:
|
||||
github:
|
||||
owner: "{{ .Env.GITHUB_OWNER }}"
|
||||
name: "{{ .Env.GITHUB_REPO }}"
|
||||
owner: "{{ .Env.GITHUB_OWNER | default .GitHubOwner }}"
|
||||
name: "{{ .Env.GITHUB_REPO | default .ProjectName }}"
|
||||
draft: false
|
||||
prerelease: auto
|
||||
mode: replace
|
||||
@ -111,11 +111,11 @@ release:
|
||||
|
||||
下载对应平台的二进制文件即可使用。
|
||||
|
||||
**完整更新日志**: https://github.com/{{ .Env.GITHUB_OWNER }}/{{ .Env.GITHUB_REPO }}/compare/{{ .PreviousTag }}...{{ .Tag }}
|
||||
**完整更新日志**: https://github.com/{{ .Env.GITHUB_OWNER | default .GitHubOwner }}/{{ .Env.GITHUB_REPO | default .ProjectName }}/compare/{{ .PreviousTag }}...{{ .Tag }}
|
||||
|
||||
---
|
||||
|
||||
如有问题请提交 [Issue](https://github.com/{{ .Env.GITHUB_OWNER }}/{{ .Env.GITHUB_REPO }}/issues) 💬
|
||||
如有问题请提交 [Issue](https://github.com/{{ .Env.GITHUB_OWNER | default .GitHubOwner }}/{{ .Env.GITHUB_REPO | default .ProjectName }}/issues) 💬
|
||||
|
||||
# 快照版本
|
||||
snapshot:
|
||||
|
40
.github/workflows/test-build.yml
vendored
40
.github/workflows/test-build.yml
vendored
@ -81,6 +81,10 @@ jobs:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: check -f .github/conf/.goreleaser.yml
|
||||
env:
|
||||
GITHUB_OWNER: ${{ steps.project.outputs.owner }}
|
||||
GITHUB_REPO: ${{ steps.project.outputs.repo }}
|
||||
PROJECT_NAME: ${{ steps.project.outputs.repo }}
|
||||
|
||||
- name: 🚀 测试构建 (Snapshot 模式)
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
@ -145,39 +149,3 @@ jobs:
|
||||
du -h dist/* | sort -h | tail -10 >> $GITHUB_STEP_SUMMARY
|
||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
# 可选:代码质量检查
|
||||
quality:
|
||||
name: 代码质量检查
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 📥 检出代码
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🐹 设置 Go 环境
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.21'
|
||||
cache: true
|
||||
|
||||
- name: 🔍 代码格式检查
|
||||
run: |
|
||||
if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then
|
||||
echo "❌ 代码格式不符合标准"
|
||||
gofmt -l .
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ 代码格式检查通过"
|
||||
|
||||
- name: 🧹 代码静态分析
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: latest
|
||||
args: --timeout=5m
|
||||
|
||||
- name: 🔒 安全检查
|
||||
run: |
|
||||
go install github.com/securecodewarrior/gosec/v2/cmd/gosec@latest
|
||||
gosec ./...
|
||||
continue-on-error: true
|
Loading…
Reference in New Issue
Block a user