fix: 替换 setup-node/setup-go 为 shell 安装命令 (Gitea 无法访问 GitHub Actions)
Some checks failed
Release / build-and-release (push) Failing after 2m54s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 11:16:26 +08:00
parent 9eabf17908
commit a12304a6a4

View File

@@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: frontend/package-lock.json
run: |
apt-get update -qq
apt-get install -y -qq nodejs npm 2>/dev/null || true
node --version
npm --version
- name: Build frontend
run: |
@@ -23,10 +23,16 @@ jobs:
npm run build
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
cache-dependency-path: backend/go.sum
run: |
if ! command -v go &>/dev/null; then
apt-get install -y -qq golang-go 2>/dev/null || {
wget -q https://go.dev/dl/go1.22.5.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.22.5.linux-amd64.tar.gz
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
export PATH="$PATH:/usr/local/go/bin"
}
fi
go version
- name: Build all platforms
run: |