version: '{build}'
skip_tags: true

install:
  - git clone https://github.com/Fluorohydride/ygopro-scripts
  - cp -rf ygopro-scripts/constant.lua DataEditorX/data
  - curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/purerosefallen/ygopro-7210srv/raw/master/strings.conf
  - cp -rf strings.conf DataEditorX/data

configuration: Release

build: 
    project: DataEditorX.sln
    parallel: true

after_build:
  - cd win32 && 7z a ../win32.zip ./* -xr!.git* -mx9 && cd ..

  - git config --global user.name "Smile-DK"
  - git config --global user.email "2236141431@qq.com"

  - git clone https://github.com/Smile-DK/ygopro-svrelease
  - cp -rf win32.zip ygopro-svrelease

  - cd ygopro-svrelease
  - git add . -A
  - git commit -m "DataEditorX pushed by Appveyor"
  - git push https://%Smile%@github.com/Smile-DK/ygopro-svrelease master
  - cd ..

test: off

artifacts:
  - path: win32.zip
    name: DataEditorX-Koishi
