From adbc129119e749c9738d0321c7b2e60a5ccfb86c Mon Sep 17 00:00:00 2001
From: Cole Bemis <cole@ifixit.com>
Date: Mon, 5 Jun 2017 00:28:24 -0700
Subject: [PATCH] chore: automate releases

---
 .travis.yml           | 11 +++++++++++
 _config.yml           |  5 -----
 _includes/header.html |  2 +-
 _includes/hero.html   |  2 +-
 bin/build-zip.sh      |  2 +-
 package.json          | 19 ++++++++++++++++---
 6 files changed, 30 insertions(+), 11 deletions(-)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..0a017a5
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,11 @@
+language: node_js
+cache:
+  directories:
+    - node_modules
+notifications:
+  email: false
+node_js: 6
+before_script:
+  - npm prune
+after_success:
+  - npm run semantic-release
diff --git a/_config.yml b/_config.yml
index 6e3f6b7..7133cc9 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,9 +1,4 @@
-data_dir: .
 exclude:
-  - README.md
-  - CHANGELOG.md
-  - ISSUE_TEMPLATE.md
-  - LICENSE
   - node_modules
   - bin
   - sandbox
diff --git a/_includes/header.html b/_includes/header.html
index 03f8945..e89b12a 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -1,6 +1,6 @@
 <header class="pv3 bb b--black-10">
   <div class="w-80 center flex justify-between items-center">
-    <h1 class="mv0 normal f3 lh-copy black-90">Feather <span class="f5 black-60">v{{ site.data.package.version }}</span></h1>
+    <h1 class="mv0 normal f3 lh-copy black-90">Feather</h1>
 
     <ul class="list mv0 pl0 flex">
       <li class="dn dib-ns"><a class="no-underline color-inherit dim" href="https://twitter.com/intent/tweet?text=Feather%20-%20Simply%20beautiful%20open%20source%20icons%20by%20%40colebemis%20https://feathericons.com" target="_blank">Tweet</a></li>
diff --git a/_includes/hero.html b/_includes/hero.html
index 5f3c74d..dde30f1 100644
--- a/_includes/hero.html
+++ b/_includes/hero.html
@@ -2,7 +2,7 @@
   <h2 class="mt0 mb4 f2 fw3 tc lh-title black-90">Simply beautiful open source icons</h2>
   <a
     class="button white bg-accent dim br2"
-    href="feather-{{ site.data.package.version }}.zip"
+    href="feather.zip"
     download
     onclick="ga('send', 'event', 'download', 'click', 'all');">
     Download
diff --git a/bin/build-zip.sh b/bin/build-zip.sh
index 4ad3221..17fec6b 100755
--- a/bin/build-zip.sh
+++ b/bin/build-zip.sh
@@ -4,4 +4,4 @@
 version=$(grep '"version"' package.json | cut -d '"' -f4)
 
 # compress 'icons' directory into feather-[version].zip
-zip -r feather-${version}.zip ./icons/
+zip -r feather.zip ./icons/
diff --git a/package.json b/package.json
index 107adce..4aa9562 100644
--- a/package.json
+++ b/package.json
@@ -1,14 +1,27 @@
 {
   "name": "feather-icons",
-  "version": "2.1.0",
+  "version": "0.0.0-development",
   "description": "Simply beautiful open source icons",
   "scripts": {
+    "commitmsg": "validate-commit-msg",
+    "cm": "git-cz",
     "svgo": "for i in $(find icons/* -type d); do svgo --pretty --multipass --config=svgo-config.yml $i; done",
     "build": "npm run build-zip && jekyll build",
-    "build-zip": "./bin/build-zip.sh"
+    "build-zip": "./bin/build-zip.sh",
+    "semantic-release": "semantic-release pre && npm publish && semantic-release post"
   },
   "devDependencies": {
-    "svgo": "^0.7.2"
+    "commitizen": "^2.9.6",
+    "cz-conventional-changelog": "^2.0.0",
+    "husky": "^0.13.4",
+    "semantic-release": "^6.3.6",
+    "svgo": "^0.7.2",
+    "validate-commit-msg": "^2.12.1"
+  },
+  "config": {
+    "commitizen": {
+      "path": "cz-conventional-changelog"
+    }
   },
   "repository": {
     "type": "git",
-- 
2.21.0