shithub: moonfish

ref: e6fc4ccbf8a7519627fdaf412ca0829d2cecb30b
dir: /.build.yml/

View raw version
# moonfish is licensed under the AGPL (v3 or later)
# copyright 2023 zamfofex

image: alpine/latest
secrets:
  - 72a028fc-f8df-43d3-a315-305d80720e45
packages:
  - build-base
  - bearssl-dev
  - bearssl-static
  - xz
  - mingw-w64-gcc
  - curl
  - cjson-dev
sources:
  - https://git.sr.ht/~zamfofex/moonfish
tasks:
  - build: |
      cd moonfish
      make LDFLAGS=-static
      make LDFLAGS=-static CC=x86_64-w64-mingw32-gcc moonfish.exe
      ./minify.sh
  - deploy: |
      set +x
      if test "$GIT_REF" = refs/heads/main && test -f neocities-token.txt
      then
        cd moonfish
        curl -fsSL --oauth2-bearer "$(cat ~/neocities-token.txt)" \
          -F moonfish=@moonfish \
          -F play=@play \
          -F lichess=@lichess \
          -F analyse=@analyse \
          -F moonfish.sh=@moonfish.sh \
          -F moonfish.exe=@moonfish.exe \
          https://neocities.org/api/upload
      fi
artifacts:
  - moonfish/moonfish
  - moonfish/play
  - moonfish/lichess
  - moonfish/analyse
  - moonfish/moonfish.sh
  - moonfish/moonfish.exe