3 Commits

Author SHA1 Message Date
乔焰阳
680d36e526 Simplify artifact handling in release workflow
Removed Gitea-specific artifact upload and download steps, simplifying the workflow.
2025-11-06 17:50:20 +08:00
乔焰阳
0a5432406a Refactor GitHub Actions workflow for releases
Updated GitHub Actions workflow to remove caching for Go installation and GF CLI, and adjusted artifact upload and download steps for GitHub and Gitea.
2025-11-06 17:20:34 +08:00
乔焰阳
7b16777411 Enhance release workflow with caching steps
Added caching for Go installation and GF CLI in the release workflow.
2025-11-06 16:03:04 +08:00

View File

@@ -23,13 +23,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4 # 使用最新稳定的v4版本
# GitHub Actions的runner环境通常已预装GoSetup Go步骤会处理版本管理
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable' # 使用最新稳定版本的Go无需手动更新版本号
- name: Install gf CLI
run: |
# 直接下载GF CLI不使用缓存以避免超时问题
echo "Downloading GF CLI"
curl -L -o gf https://github.com/gogf/gf/releases/latest/download/gf_linux_amd64
chmod +x gf
mkdir -p "$HOME/bin"
@@ -43,8 +45,7 @@ jobs:
run: gf build -ew -v "${{ github.ref_name }}"
- name: Upload build artifacts
# 使用main分支以获取最新版本的action无需手动更新版本
uses: actions/upload-artifact@main
uses: actions/upload-artifact@v4 # 使用v4版本
with:
name: p2p-${{ github.ref_name }}
path: |
@@ -62,8 +63,7 @@ jobs:
uses: actions/checkout@v4
- name: Download artifacts
# 使用main分支以获取最新版本的action无需手动更新版本
uses: actions/download-artifact@main
uses: actions/download-artifact@v4 # 使用v4版本
with:
name: p2p-${{ github.ref_name }}
path: bin