Files
Fig/.woodpecker.yml
2026-01-02 16:48:10 +08:00

53 lines
1.4 KiB
YAML

when:
event:
include: [ tag ]
steps:
setup:
image: debian:stable
commands:
- apt-get update
- apt-get install -y xmake mingw-w64 zip git
- xmake --version
# =========================
# Linux Build
# =========================
linux-build:
image: debian:stable
commands:
- xmake f -p linux -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 && zip -r fig-linux-${CI_COMMIT_TAG}.zip linux
# =========================
# Windows (Mingw) Build
# =========================
windows-build:
image: debian:stable
commands:
- xmake f -p mingw -m release
- xmake
- mkdir -p dist/windows
- cp build/mingw/x86_64/release/Fig.exe dist/windows/Fig.exe
- cp -r src/Module/Library dist/windows/Library
- cd dist && zip -r fig-windows-${CI_COMMIT_TAG}.zip windows
# =========================
# Upload to Gitea Release
# =========================
release:
image: woodpeckerci/plugin-gitea-release
settings:
api_key:
from_secret: GITEA_TOKEN
base_url: https://git.fig-lang.cn
files:
- dist/fig-linux-${CI_COMMIT_TAG}.zip
- dist/fig-windows-${CI_COMMIT_TAG}.zip
note: "Automated build for ${CI_COMMIT_TAG}"