ref: e475abcb1367ff05b438c580c3aa63e5befbe345
dir: /.build.yml/
# moonfish is licensed under the AGPL (v3 or later)
# copyright 2023, 2024 zamfofex
image: alpine/latest
secrets:
- 72a028fc-f8df-43d3-a315-305d80720e45
packages:
- build-base
- libressl-dev
- curl
- cjson-dev
tasks:
- build: |
cd moonfish
make LDFLAGS=-static
- strip: |
cd moonfish
strip --strip-all moonfish lichess analyse chat
- deploy: |
set +x
if test "x$GIT_REF" = x || ! test -f neocities-token.txt
then exit 0
fi
if test "$GIT_REF" = refs/heads/main
then root=
else root="${GIT_REF#refs/*/}"
fi
cd moonfish
curl -fsSL --oauth2-bearer "$(cat ~/neocities-token.txt)" \
-F "$root"/moonfish=@moonfish \
-F "$root"/lichess=@lichess \
-F "$root"/analyse=@analyse \
-F "$root"/chat=@chat \
https://neocities.org/api/upload