mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2025-01-09 14:22:53 -05:00
Merge pull request #90 from rschamp/travis-stages
Release with build stages
This commit is contained in:
commit
75a32bf7fd
2 changed files with 19 additions and 25 deletions
42
.travis.yml
42
.travis.yml
|
@ -1,6 +1,6 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- 6
|
- 8
|
||||||
- node
|
- node
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -12,26 +12,22 @@ script: npm run $NPM_SCRIPT
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- env: NPM_SCRIPT=build
|
- env: NPM_SCRIPT=build
|
||||||
node_js: node
|
node_js: 8
|
||||||
|
if: not (branch in (master, develop) and type != pull_request)
|
||||||
- env: NPM_SCRIPT=lint
|
- env: NPM_SCRIPT=lint
|
||||||
node_js: node
|
node_js: 8
|
||||||
after_script:
|
- stage: release
|
||||||
- |
|
node_js: 8
|
||||||
# RELEASE_BRANCHES and NPM_TOKEN defined in Travis settings panel
|
script: skip
|
||||||
declare exitCode
|
before_deploy:
|
||||||
$(npm bin)/travis-after-all
|
- npm --no-git-tag-version version 0.1.0-prerelease.$(date +%Y%m%d%H%M%S)
|
||||||
exitCode=$?
|
deploy:
|
||||||
if [[
|
- provider: npm
|
||||||
# Execute after all jobs finish successfully
|
on:
|
||||||
$exitCode = 0 &&
|
all_branches: true
|
||||||
# Only release on release branches
|
email: $NPM_EMAIL
|
||||||
$RELEASE_BRANCHES =~ $TRAVIS_BRANCH &&
|
api_key: $NPM_TOKEN
|
||||||
# Don't release on PR builds
|
stages:
|
||||||
$TRAVIS_PULL_REQUEST = "false"
|
- test
|
||||||
]]; then
|
- name: release
|
||||||
# Authenticate NPM
|
if: branch in (master, develop) and type != pull_request
|
||||||
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
|
|
||||||
# Set version to timestamp
|
|
||||||
npm --no-git-tag-version version $($(npm bin)/json -f package.json version)-prerelease.$(date +%s)
|
|
||||||
npm publish
|
|
||||||
fi
|
|
||||||
|
|
|
@ -34,8 +34,6 @@
|
||||||
"babel-preset-env": "^1.6.1",
|
"babel-preset-env": "^1.6.1",
|
||||||
"eslint": "^3.19.0",
|
"eslint": "^3.19.0",
|
||||||
"eslint-config-scratch": "^3.1.0",
|
"eslint-config-scratch": "^3.1.0",
|
||||||
"json": "^9.0.6",
|
|
||||||
"travis-after-all": "^1.4.4",
|
|
||||||
"webpack": "^4.8.0",
|
"webpack": "^4.8.0",
|
||||||
"webpack-cli": "^2.0.15",
|
"webpack-cli": "^2.0.15",
|
||||||
"tap": "^12.0.1"
|
"tap": "^12.0.1"
|
||||||
|
|
Loading…
Reference in a new issue