Files
Fig/.woodpecker.yml
2026-01-02 16:36:33 +08:00

55 lines
1.3 KiB
YAML

pipeline:
linux-build:
image: ubuntu:22.04
environment:
VERSION: ${CI_COMMIT_TAG}
commands:
- apt update
- apt install -y git build-essential wget unzip
- wget https://xmake.io/shget.text -O - | bash
- export PATH=~/.local/bin:$PATH
- xmake --version
# 构建
- xmake f -m release
- xmake
# 输出目录
- mkdir -p dist/Linux
- cp build/linux/x86_64/release/Fig dist/Linux/Fig
- cp -r src/Module/Library dist/Linux/Library
# 打包
- cd dist
- tar -czf Fig-${VERSION}-linux-x86_64.tar.gz Linux
when:
event: tag
windows-build:
image: mcr.microsoft.com/windows/servercore:ltsc2022
platform: windows
environment:
VERSION: ${CI_COMMIT_TAG}
commands:
- choco install -y git
- choco install -y xmake
- refreshenv
- xmake --version
# 构建
- xmake f -m release
- xmake
# 输出
- mkdir dist
- mkdir dist\\Windows
- copy build\\windows\\x86_64\\release\\Fig.exe dist\\Windows\\Fig.exe
- xcopy src\\Module\\Library dist\\Windows\\Library /E /I
# 打包
- powershell -command "Compress-Archive dist\\Windows Fig-$env:VERSION-windows-x86_64.zip"
when:
event: tag