 
     .then (dirs) ->
       dirs = dirs.map (dir) ->
-        name = "#{basename dir}.zip"
-        {
-          dir, name
-          zip: "tmp/#{name}"
-        }
+        name = basename dir
+        zip = "#{name}.zip"
+        {dir, name, zip}
+
+      github = new GitHub
+        version: "3.0.0"
+        debug: true
+      github.authenticate
+        type: 'oauth'
+        token: process.env.TOKEN
 
       Q
         .all dirs.map ({dir, name, zip}) ->
           d = Q.defer()
-          console.log "zip #{name}"
-          zip = spawn 'zip', [zip, '-r', dir]
+          console.log "zip #{name} to #{zip}"
+          zip = spawn 'zip', [zip, '-r', name]
           zip.stdout.on 'data', (data) -> console.log data.toString 'utf8'
           zip.stderr.on 'data', (data) -> console.log data.toString 'utf8'
           zip.on 'close', (code) -> d.resolve()

gutil = require 'gulp-util'
plumber = require 'gulp-plumber'
webpack = require 'webpack'
{join, basename} = require 'path'
{readFileSync, writeFileSync, existsSync, mkdirSync} = require 'fs'
{cloneDeep} = require 'lodash'
packager = require 'electron-packager'

      output: './dist/main.js'

gulp.task 'publish', ->
  Q
    .when ''
    .then ->
