From 1dc980b92e85ab5c3651b021161d10e165e7a579 Mon Sep 17 00:00:00 2001 From: John Niang Date: Tue, 21 May 2019 16:19:45 +0800 Subject: [PATCH] Update .travis.yml (#9) --- .travis.yml | 11 +++++------ scripts/zip_dist.sh | 4 +++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60619bac..b3f1dd8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: stable -cache: npm jobs: include: @@ -8,18 +7,18 @@ jobs: script: - npm run build - scripts/zip_dist.sh - - stage: release - script: echo "Releasing to Github Release..." + - ls -la dist deploy: provider: releases api_key: $GITHUB_OAUTH_TOKEN file_glob: true file: dist/*.zip + skip_cleanup: true on: tags: true stages: - build - - name: release - if: tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ branches: - only: /^v\d+\.\d+(\.\d+)?(-\S*)?$/ + only: + - master + - /^v\d+\.\d+(\.\d+)?(-\S*)?$/ diff --git a/scripts/zip_dist.sh b/scripts/zip_dist.sh index 1a382812..3cd6cc68 100755 --- a/scripts/zip_dist.sh +++ b/scripts/zip_dist.sh @@ -1,4 +1,6 @@ #!/bin/bash PACKAGE_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json) echo "Halo admin version $PACKAGE_VERSION" -zip -r dist/halo-admin-$PACKAGE_VERSION.zip dist \ No newline at end of file +zip -r dist/halo-admin-$PACKAGE_VERSION.zip dist + +export PACKAGE_VERSION \ No newline at end of file