# http://docs.gitlab.com/ce/ci/docker/using_docker_build.html#using-the-gitlab-container-registry
# The docker tag is the first 6 letters of the Git commit id

job_build_dotnet:
       stage: build
       image: archlinux/base:latest
       variables:
         GIT_SUBMODULE_STRATEGY: recursive
       script:
         - pacman-key --init
         - pacman-key --recv-keys 3FABB87C7C9F7E5FF2B6CB7B11A7E7E4DB9351DE
         - pacman-key --lsign-key 3FABB87C7C9F7E5FF2B6CB7B11A7E7E4DB9351DE
         - bash -c "echo -e '"'[zotancc]\nServer = https://arch.zotan.cc/zotancc/os/$arch'"' >> /etc/pacman.conf"
         - pacman -Syu --needed dotnet-sdk-bin --noconfirm
         - curl -Lo warp-packer https://github.com/dgiagio/warp/releases/download/v0.3.0/linux-x64.warp-packer && chmod +x warp-packer
         - dotnet publish -c Release -r linux-x64
         - dotnet publish -c Release -r osx-x64
         - ./warp-packer --arch linux-x64 --input_dir telegram/bin/Release/netcoreapp3.1/linux-x64/publish --exec telegram --output tgcli.linux.run
         - ./warp-packer --arch macos-x64 --input_dir telegram/bin/Release/netcoreapp3.1/osx-x64/publish --exec telegram --output tgcli.macos.run
         - chmod +x tgcli.linux.run tgcli.macos.run
       artifacts:
         paths:
          - tgcli.linux.run
          - tgcli.macos.run
