build.sh 686 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. set -e
  3. if [ -z "$GITHUB_REF" ];
  4. then
  5. BRANCH=$(git symbolic-ref --short -q HEAD)
  6. else
  7. BRANCH=${GITHUB_REF#refs/heads/}
  8. fi
  9. echo "Building spine-ts $BRANCH artifacts"
  10. npm install
  11. if ! [ -z "$TS_UPDATE_URL" ] && ! [ -z "$BRANCH" ];
  12. then
  13. echo "Deploying spine-ts $BRANCH artifacts"
  14. zip -j spine-ts.zip \
  15. spine-core/dist/iife/* \
  16. spine-canvas/dist/iife/* \
  17. spine-webgl/dist/iife/* \
  18. spine-player/dist/iife/* \
  19. spine-threejs/dist/iife/* \
  20. spine-pixi/dist/iife/* \
  21. spine-phaser/dist/iife/* \
  22. spine-player/css/spine-player.css
  23. curl -f -F "[email protected]" "$TS_UPDATE_URL$BRANCH"
  24. else
  25. echo "Not deploying artifacts. TS_UPDATE_URL and/or BRANCH not set."
  26. fi