From eeaa5310831a51a80a4bdda19302f316a8d87e37 Mon Sep 17 00:00:00 2001 From: Jia Hao Goh Date: Thu, 20 Apr 2017 10:03:40 +0800 Subject: [PATCH] Add autodeploy to NPM on tag Removing the development branch, we want to use GitHub releases to autodeploy our changes to NPM. --- .travis.yml | 45 ++++++++++++++++++++++++++++------------- docs/release.md | 53 ++++++++++++++++++++----------------------------- 2 files changed, 52 insertions(+), 46 deletions(-) diff --git a/.travis.yml b/.travis.yml index 940888f..a940788 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,42 @@ language: node_js + env: - CXX=g++-4.8 + addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-4.8 -node_js: - - "node" - - "5" - - "4" -before_install: - # install wine - - sudo add-apt-repository -y ppa:wine/wine-builds && sudo apt-get update && sudo apt-get install -y --install-recommends winehq-devel -install: - - npm run dev-up -script: - - npm run ci -after_script: - - codeclimate-test-reporter < ./coverage/lcov.info -addons: code_climate: repo_token: CODE_CLIMATE_TOKEN + +node_js: + - node + - '6' + - '5' + - '4' + +before_install: + # Install wine + - sudo add-apt-repository -y ppa:wine/wine-builds && sudo apt-get update && sudo apt-get install -y --install-recommends winehq-devel + +install: + - npm run dev-up + +script: + - npm run ci + +after_script: + - codeclimate-test-reporter < ./coverage/lcov.info + +deploy: + provider: npm + email: jiahaog@gmail.com + api_key: + secure: d/wwkEjXrgP7fJrbkqdSH2779ijL6zIMjRokGP6ojB+7SNiefO0tR8A+hVifeePRC8tDmg4Q/SaVN61+sVNiJc2lDMej6UyRy1WuYW9sYovc5ZRHfba/xUVlq8xQbww/bz2MD8Um9/ayKMViw1Mkt5BQ1sBf/4Q3Ua6WSGsy2rET234rVuk5eR9cYeA/WTH+/w4ae59ki2qyezFwSgCaM9SkxStKez+btKcltIpCBi/k28DjWFPhmGarouR5MYwGG0CqaLzYKgxWqaKS6wN/nO0YrdHBJyciZhccbxWOg9G2sKPTBsebYdyPCe9ykEAGkeibVjvUBGYsDxObTo5W4ccYgq9g/nSbSxyaYn022Xs7EJcGfZf8KWAeZuLrwtb/VgRQyZI5QOMRjN8s50oirVyWBH/lGD4VdKDix3TMbwsgs1Q3VbmU/4bSqeh3HSDK/chEDsw3rzu2c/D/Fl/4kh0MOX4q/qO/2bj9aEpX/Gc4JVqL9y89IeoYGE7ZzecCq64L0oKbNT0qAUjthFAu0a4E+zOedj5z/HpEMaqeH6FBF8a/Ds95QB9NX0REBsHazKcjOCv4wc6sItY4Wdj+l0/lkTSwuPhdgH9gwDbnwlSGG9j01k3aFhdxTm2k2nRzjoUs2iRZjnUwVLxVFn0jUyKh7mkRZZalaNeLQb0zTu4= + on: + tags: true + repo: jiahaog/nativefier + branch: development diff --git a/docs/release.md b/docs/release.md index f3f2a98..6ce7111 100644 --- a/docs/release.md +++ b/docs/release.md @@ -1,39 +1,28 @@ # Release Notes -My notes for release commands to NPM +How to release a new version to NPM ## Releasing -At branch `development` ready to release to npm: - -``` bash -# Make sure ci tests pass -npm run ci - -# See the current version -npm version - -# Update the changlog and perform cleanup on it -git changelog docs/changelog.md --tag -subl docs/changelog.md - -git add docs/changelog.md -git commit -m "Update changelog for \`v\`" - -npm version - -# Can automate from here onwards - -# Publish it to npm -npm run release - -# Merge changes into master -git checkout master -git merge development - -git push --follow-tags - -# Return to development -git checkout development +Run the following command to get the changelog ``` +git checkout master + +# Get the current version +npm version + +# Add the changelog for the next version +git changelog docs/changelog.md --tag + +# Edit the changelog +vim docs/changelog.md + +# Commit it +git add docs/changelog.md +git commit -m "Update changelog for \`v\`" +git push +``` + +On [GitHub Releases](https://github.com/jiahaog/nativefier/releases), draft and publish a new release with title `Nativefier vX.X.X`. +