谁会CI帮我下我要死了 2
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2026-01-03 10:49:55 +08:00
parent 2dfd4fd7f4
commit 5c9aca0a0d

View File

@@ -1,12 +1,11 @@
steps: steps:
- name: build-cross - name: build-cross
image: "ubuntu:24.04" image: "ubuntu:24.04"
shell: /bin/bash # 强制 bash避免 dash 语法报错
when: when:
event: event:
- push - push
- tag - tag
environment:
SHELL: "/bin/bash"
commands: commands:
# 1⃣ 国内源加速 # 1⃣ 国内源加速
- cp /etc/apt/sources.list /etc/apt/sources.list.backup - cp /etc/apt/sources.list /etc/apt/sources.list.backup
@@ -20,10 +19,10 @@ steps:
- apt-get update -y - apt-get update -y
- apt-get install -y curl git build-essential clang llvm mingw-w64 ninja-build jq - apt-get install -y curl git build-essential clang llvm mingw-w64 ninja-build jq
# 2⃣ 安装 xmake 到全局 PATH # 2⃣ 安装 xmake 到全局 PATH(安全稳定)
- bash <(curl -fsSL https://xmake.io/shget.text) --install-to=/usr/local/bin - curl -fsSL https://xmake.io/shget.text | bash -s -- --install-to=/usr/local/bin
# 3读取真实版本号 # 3获取版本号tag 或 commit
- VERSION=$(git describe --tags --always --dirty) - VERSION=$(git describe --tags --always --dirty)
# 4⃣ Linux 构建 # 4⃣ Linux 构建
@@ -39,6 +38,7 @@ steps:
- name: gitea-release - name: gitea-release
image: "ubuntu:24.04" image: "ubuntu:24.04"
shell: /bin/bash
when: when:
event: event:
- tag - tag
@@ -46,7 +46,7 @@ steps:
GITEA_TOKEN: GITEA_TOKEN:
from_secret: GITEA_TOKEN from_secret: GITEA_TOKEN
commands: commands:
- TAG=$(git describe --tags --exact-match || echo ${DRONE_TAG}) - TAG=$(git describe --tags --exact-match 2>/dev/null || echo ${DRONE_TAG})
- echo "Uploading Fig binaries for tag $TAG to Gitea" - echo "Uploading Fig binaries for tag $TAG to Gitea"
# Linux binary # Linux binary