Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Update .travis.yml (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnNiang authored May 21, 2019
1 parent b612530 commit 1dc980b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
language: node_js
node_js: stable
cache: npm

jobs:
include:
- stage: build
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*)?$/
4 changes: 3 additions & 1 deletion scripts/zip_dist.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1dc980b

Please sign in to comment.