From bf65bc8b811d717ac539150fa100244c9fc29a34 Mon Sep 17 00:00:00 2001 From: Kinshuk Bairagi Date: Mon, 17 Aug 2020 01:36:40 +0530 Subject: [PATCH] Upload Build Artifacts to Github Releases (#28) --- .devcontainer/build.sh | 5 +---- .travis.yml | 42 +++++++++++++++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/.devcontainer/build.sh b/.devcontainer/build.sh index 39822fcd..1e02e020 100755 --- a/.devcontainer/build.sh +++ b/.devcontainer/build.sh @@ -16,10 +16,7 @@ make make install #package orkaudio deb -git clone https://github.com/voiceip/oreka-build.git /oreka-build cd /oreka-build/distribution -chmod +x make-orkaudio-deb.sh -./make-orkaudio-deb.sh +bash make-orkaudio-deb.sh ls -ltrah *.deb - diff --git a/.travis.yml b/.travis.yml index db6cbdff..b869174a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,39 @@ sudo: true -dist: bionic +language: shell os: linux -language: bash +dist: xenial +addons: + apt: + packages: + - docker-ce + - tree services: - - docker +- docker branches: - only: - - master + only: + - master + # Ruby regex to match tags. Required, or travis won't trigger deploys when + # a new tag is pushed. Version tags should be of the form: v0.1.0 + - /^v\d+\.\d+\.\d+.*$/ +cache: + directories: + - $HOME/docker_images before_install: - - sed -i 's/#INSERT_HERE/COPY . \/oreka-src/g' .devcontainer/Dockerfile.orkaudio.build - - echo "[Login]\nUsername = $MEGANAME \nPassword = $MEGAPASS" > .megarc - - docker build -t oreka -f .devcontainer/Dockerfile.orkaudio.build . +- docker load -i $HOME/docker_images/images.tar || true +- git clone https://github.com/voiceip/oreka-build.git $HOME/oreka-build +- docker build -t oreka -f .devcontainer/Dockerfile.orkaudio.build . script: - - docker run -i oreka bash /entrypoint.sh +- docker run -v "$HOME/oreka-build":/oreka-build -v "$TRAVIS_BUILD_DIR":/oreka-src -i oreka bash /entrypoint.sh +- ls -ltrah $HOME/oreka-build/distribution +before_cache: +- docker save -o $HOME/docker_images/images.tar $(docker images -a -q) +deploy: + provider: releases + api_key: + secure: "M4odEjSv9Hj8BoMCkc10DRJmA+FVrWrbwKt4vHVy04WVUonwZo5/31UsUJgDYMV+SnRazTDDTfhjFuWbWaKkNUgVm42Ddz1sQdiOg5/3DXUHI6hAM3HKpiO5f2MgMGbHtga1l4VqMbDJhQEGl8StsQq64tXwcHCGHykX7F0ZPJx/QPy8VEfFZ330i3J4tl36jS7pE5LsVUzfzfoMp0aruM1lpg9BJXW0CcI7+0wZTxLrgziWnk6r0DSltDvbVkeWDE8Ol+51CfxIlwatEfTj3R5xx1XvRFUumLm/w4hal19Thi5Owag6kTtP6wmcYnd+UA1awpe6NZZlRr3Tdly67Pduh/B5BT7cLGGuOw55KaPk9ZPM5omQptp5hVhxw2xMg7tLyqh30nxXZaH4/maXp9RJmr7o1gRKmv6Fe0mthcaO+AtOCPZy6Rwe285ZdhP0pbnBRA6qHNPUn5zagsDunEtvchU5TfRkdx7Lw01kqtgQaZP2PwraG9JQf3HoUIyM1pwMVlXqao3CFVbbsebobIUrqZqcdAwXmVTt4O+4FMCwJohGSI3Hk8/XPKypXl+yY91UAF82Kc4lVnXp7CvhJpEx+7eP8dW16cHwwwU1QLJ/xJMLXRNgOZO+4XqlicKCaK7yi551nJqwHIPGhu20465E4BD6BrlKVuIv072Y9HU=" + file_glob: true + file: $HOME/oreka-build/distribution/*.deb + skip_cleanup: true + draft: true + on: + tags: true