mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-22 14:02:29 -05:00
Release with build stages
Also update to Node 8, and specify the stable 8 for build/lint/release, rather than latest stable Node, so less stuff changes.
This commit is contained in:
parent
2a63b0b027
commit
110c07594d
2 changed files with 19 additions and 25 deletions
42
.travis.yml
42
.travis.yml
|
@ -1,6 +1,6 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- 6
|
||||
- 8
|
||||
- node
|
||||
env:
|
||||
matrix:
|
||||
|
@ -12,26 +12,22 @@ script: npm run $NPM_SCRIPT
|
|||
jobs:
|
||||
include:
|
||||
- env: NPM_SCRIPT=build
|
||||
node_js: node
|
||||
node_js: 8
|
||||
if: not (branch in (master, develop) and type != pull_request)
|
||||
- env: NPM_SCRIPT=lint
|
||||
node_js: node
|
||||
after_script:
|
||||
- |
|
||||
# RELEASE_BRANCHES and NPM_TOKEN defined in Travis settings panel
|
||||
declare exitCode
|
||||
$(npm bin)/travis-after-all
|
||||
exitCode=$?
|
||||
if [[
|
||||
# Execute after all jobs finish successfully
|
||||
$exitCode = 0 &&
|
||||
# Only release on release branches
|
||||
$RELEASE_BRANCHES =~ $TRAVIS_BRANCH &&
|
||||
# Don't release on PR builds
|
||||
$TRAVIS_PULL_REQUEST = "false"
|
||||
]]; then
|
||||
# Authenticate NPM
|
||||
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
|
||||
node_js: 8
|
||||
- stage: release
|
||||
node_js: 8
|
||||
script: skip
|
||||
before_deploy:
|
||||
- npm --no-git-tag-version version 0.1.0-prerelease.$(date +%Y%m%d%H%M%S)
|
||||
deploy:
|
||||
- provider: npm
|
||||
on:
|
||||
all_branches: true
|
||||
email: $NPM_EMAIL
|
||||
api_key: $NPM_TOKEN
|
||||
stages:
|
||||
- test
|
||||
- name: release
|
||||
if: branch in (master, develop) and type != pull_request
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
"babel-preset-env": "^1.6.1",
|
||||
"eslint": "^3.19.0",
|
||||
"eslint-config-scratch": "^3.1.0",
|
||||
"json": "^9.0.6",
|
||||
"travis-after-all": "^1.4.4",
|
||||
"webpack": "^4.8.0",
|
||||
"webpack-cli": "^2.0.15",
|
||||
"tap": "^12.0.1"
|
||||
|
|
Loading…
Reference in a new issue