Files
Fig/.woodpecker.yml
PuqiAR 8981d55641
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
iam tired
2026-01-02 17:37:53 +08:00

50 lines
1.9 KiB
YAML

steps:
- name: build-cross
image: "ubuntu:24.04"
when:
event:
- push
- tag
environment:
SHELL: "/bin/bash"
commands:
- cp /etc/apt/sources.list /etc/apt/sources.list.backup
- |
cat <<EOF > /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs) main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ $(lsb_release -cs)-backports main restricted universe multiverse
EOF
- apt-get update -y
- apt-get install -y curl git build-essential clang llvm mingw-w64 ninja-build jq
- curl -fsSL https://xmake.io/shget.text | bash
- export PATH=$PATH:/root/.xmake/bin
- xmake f -m release
- xmake -v
- mkdir -p dist
- cp `xmake u -o`/Fig dist/Fig-linux
- xmake f -m release --plat=windows --arch=x86_64 --cc=x86_64-w64-mingw32-g++ --cxx=x86_64-w64-mingw32-g++
- xmake -v
- cp `xmake u -o`/Fig.exe dist/Fig-windows.exe
- name: gitea-release
image: "ubuntu:24.04"
when:
event:
- tag
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
commands:
- TAG=${DRONE_TAG}
- echo "Uploading Fig binaries for tag $TAG to Gitea"
- |
curl -X POST -H "Authorization: token ${GITEA_TOKEN}" \
-F "name=Fig-linux" -F "file=@dist/Fig-linux" \
"https://git.fig-lang.cn/api/v1/repos/PuqiAR/Fig/releases/${TAG}/assets"
- |
curl -X POST -H "Authorization: token ${GITEA_TOKEN}" \
-F "name=Fig-windows.exe" -F "file=@dist/Fig-windows.exe" \
"https://git.fig-lang.cn/api/v1/repos/PuqiAR/Fig/releases/${TAG}/assets"