dist: trusty
sudo: false
language: node_js
node_js:
  - "node"

git:
  depth: 1

env:
  global:
    - secure: "X0PrKXLjW6r8e0zT7+SshhP7uaW/5EW2BJPCc/oRIWX6eC4QLXv0lQBstIZ6vChAvgYv2K1CcBlWHrQarTlHqmkYnfHAfOFK//qURFUfuyTkKcKU/aCYvm4op0jPGw8+wbOkxwfnbvOaa0E7oBv4GCXVPYCU3nm7E1H2XHgcfJukaEhpvFfHaNohoh1ygVt65G1WIoYwUIFh/0XXgP6RVBDCAU+QYaNopK5co2O40vhjtg2f0la4zMsunMEY5oXNMaM/oRAvGBaXJ3KUTgSb0+uRlEM/XxOYRyfmG6fjVXYbwL6j+kNCLsZklCfN98AAvbysCebQWhI46vJcPa/Ji/ImMeAns17fBlHMn+PI0MIBbPkMztEkenXW3Yv1BquBHElhB758Fd1Zt9KdA5H5JC6WfuRBd+QBwlzOBxOrVfmaI3uOmy3cEvQZgckPGN+7SdSDyrw/+ukM+Ks775qaZ/bw3eQyMx6DpfATa6pVzK0AWj4Xlm4IufaOFI/hy2gH60hV+3KuYXeSJOq4gXYbtJcruAbHK5YOeEmAEsVCpz+RKSuAWWvcPktoyLTOjbGTM89Yf3jFgZOFi4HNCt7K67/bDnflsHj04X/pDm3gQ0XhxQx1Sj1j0IG1XLh+k37uL2FZusBbd+8kI1SkMED5aVWTp1WmbJN+dJXZMWJxJPc=" # GITHUB_TOKEN

if: tag IS blank

install: npm install -g github-release-cli@0.4.1

script:
  - cd Enhancements && zip -r -q -9 "../graphicPacks$TRAVIS_BUILD_NUMBER"".zip" ./* && cd ..
  - cd Resolutions && zip -r -q -9 "../graphicPacks$TRAVIS_BUILD_NUMBER"".zip" ./* && cd ..
  - cd Mods && zip -r -q -9 "../graphicPacks$TRAVIS_BUILD_NUMBER"".zip" ./* && cd ..
  - cd Workarounds && zip -r -q -9 "../graphicPacks$TRAVIS_BUILD_NUMBER"".zip" ./* && cd ..
  - |
    github-release upload \
      --owner=slashiee \
      --repo=cemu_graphic_packs \
      --tag="Travis$TRAVIS_BUILD_NUMBER" \
      --name="Cemu Graphic Packs: V$TRAVIS_BUILD_NUMBER" \
      --body="$(git log -1 --format='Commited at %ci by **%cn** in commit %h%n### %s%n```%n%b%n```%n')" \
      "graphicPacks$TRAVIS_BUILD_NUMBER"".zip"
