Browse Source

travis: add github releases uploader (#47)

pull/2/head
Alibek Omarov 5 years ago
parent
commit
0366035237
  1. 12
      .travis.yml
  2. 27
      scripts/continious_upload.sh
  3. 7
      scripts/yadisk_upload.sh

12
.travis.yml

@ -10,7 +10,7 @@ git: @@ -10,7 +10,7 @@ git:
submodules: true
jdk:
- oraclejdk8
jobs:
include:
- stage: init
@ -47,7 +47,7 @@ jobs: @@ -47,7 +47,7 @@ jobs:
- sh scripts/build_${TRAVIS_OS_NAME}_engine.sh
after_script:
- ccache --show-stats
- sh scripts/yadisk_upload.sh Xash3DFWGS-i386.AppImage
- sh scripts/continious_upload.sh Xash3DFWGS-i386.AppImage
# - # ...
# name: "Build for Windows MinGW"
# cache: ccache
@ -68,7 +68,7 @@ jobs: @@ -68,7 +68,7 @@ jobs:
# - sh scripts/build_mingw_engine.sh
# after_script:
# - ccache --show-stats
# - sh scripts/yadisk_upload.sh xash3d-mingw.7z
# - sh scripts/continious_upload.sh xash3d-mingw.7z
- # ...
name: "Build for OSX"
cache: ccache
@ -90,11 +90,11 @@ jobs: @@ -90,11 +90,11 @@ jobs:
script:
- sh scripts/build_${TRAVIS_OS_NAME}_engine.sh
after_script:
- sh scripts/yadisk_upload.sh xash3d-vc.7z xash3d-vc2008-sln.7z
- sh scripts/continious_upload.sh xash3d-vc.7z xash3d-vc2008-sln.7z
- stage: deploy
name: "Deploy to github"
name: "Deploy to github repo"
os: linux
cache: false
script:
- sh scripts/travis-deploy.sh Xash3DFWGS-i386.AppImage xash3d-osx.tar.bz2 xash3d-vc.7z xash3d-vc2008-sln.7z # xash3d-mingw.7z

27
scripts/continious_upload.sh

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
##################################
#
# GitHub Releases
#
##################################
set +x
wget -O upload.sh "https://raw.githubusercontent.com/FWGS/uploadtool/master/upload.sh"
chmod +x upload.sh
export GITHUB_TOKEN=$GH_TOKEN
./upload.sh $*
##################################
#
# Yandex.Disk
#
##################################
FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH
WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru
for file in $*; do
echo "Uploading $file..."
curl -T $file $WEBDAV_SRV/$FOLDER_NAME/$file
done

7
scripts/yadisk_upload.sh

@ -1,7 +0,0 @@ @@ -1,7 +0,0 @@
FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH
WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru
for file in $*; do
echo "Uploading $file..."
curl -T $file $WEBDAV_SRV/$FOLDER_NAME/$file
done
Loading…
Cancel
Save