Update .travis.yml (#9)

pull/25/head
John Niang 2019-05-21 16:19:45 +08:00 committed by GitHub
parent b612530b81
commit 1dc980b92e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -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*)?$/

View File

@ -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
zip -r dist/halo-admin-$PACKAGE_VERSION.zip dist
export PACKAGE_VERSION