forked from PuqiAR/Fig-TreeWalker
谁会CI帮我下我要死了 2
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user