Update .travis.yml (#9)

pull/25/head
John Niang 6 years ago committed by GitHub
parent b612530b81
commit 1dc980b92e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,5 @@
language: node_js language: node_js
node_js: stable node_js: stable
cache: npm
jobs: jobs:
include: include:
@ -8,18 +7,18 @@ jobs:
script: script:
- npm run build - npm run build
- scripts/zip_dist.sh - scripts/zip_dist.sh
- stage: release - ls -la dist
script: echo "Releasing to Github Release..."
deploy: deploy:
provider: releases provider: releases
api_key: $GITHUB_OAUTH_TOKEN api_key: $GITHUB_OAUTH_TOKEN
file_glob: true file_glob: true
file: dist/*.zip file: dist/*.zip
skip_cleanup: true
on: on:
tags: true tags: true
stages: stages:
- build - build
- name: release
if: tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/
branches: branches:
only: /^v\d+\.\d+(\.\d+)?(-\S*)?$/ only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/

@ -2,3 +2,5 @@
PACKAGE_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json) PACKAGE_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json)
echo "Halo admin version $PACKAGE_VERSION" echo "Halo admin version $PACKAGE_VERSION"
zip -r dist/halo-admin-$PACKAGE_VERSION.zip dist zip -r dist/halo-admin-$PACKAGE_VERSION.zip dist
export PACKAGE_VERSION
Loading…
Cancel
Save