title: How to make a simple updater for my electron app
body: <p>My code so far.</p>
  
  <h3>Package.json</h3>
  
  <pre><code>    {
    "name": "myAppName",
    "version": "1.0.0",
    "description": "myAppName description",
    "main": "main.js",
    "scripts": {
      "start": "electron main.js",
      "build": "build --win"
    },
    "build": {
      "squirrelWindows": {
        "remoteReleases": "https://github.com/George/plx"
      },
      "win": {
        "certificateFile": "cert/myCerification.pfx",
        "certificatePassword": "123"
      },
      "appId": "myApp.id",
      "productName": "myAppName",
      "publish": [
        {
          "provider": "github",
          "owner": "George",
          "repo": "plx"
        }
      ]
    },
    "repository": {
      "type": "git",
      "url": "git+https://github.com/George/plx.git"
    },
    "author": "George",
    "license": "MIT",
    "bugs": {
      "url": "https://github.com/George/plx/issues"
    },
    "homepage": "https://github.com/George/plx#readme",
    "devDependencies": {
      "electron": "^1.6.2",
      "electron-builder": "^15.3.0",
      "electron-squirrel-startup": "^1.0.0"
    },
    "dependencies": {
      "electron-log": "^1.3.0",
      "electron-updater": "^1.4.2" //delete
    }
  }
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const electron = require('electron');
  const app = electron.app;
  const BrowserWindow = electron.BrowserWindow;
  
  
  
  
  let mainWindow;
  
  const createWindow = () =&gt; {
    mainWindow = new BrowserWindow({ 
      width: 800, 
      height: 600, 
      visible: true,
      icon: __dirname + 'build/icon.ico'
    });
  
    mainWindow.loadURL(`file://${__dirname}/index.html`);
  
    mainWindow.webContents.openDevTools();
  
    mainWindow.on('closed', () =&gt; {
      mainWindow = null;
    })
  }
  
  app.on('ready', createWindow)
  app.on('window-all-closed', () =&gt; {
    app.quit()
  });
  
  app.on('activate', () =&gt; {
    if (mainWindow === null) {
      createWindow();
    }
  })
  
  const squirrelCommand = process.argv[1];
  switch (squirrelCommand) {
    case '--squirrel-install':
    case '--squirrel-updated':
    case '--squirrel-obsolete':
      app.quit();
    return true;
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>Body{
    background: dodgerblue;
    font-family: 'Roboto', sans-serif;
    text-align: center;
  }
  
  h1, h5 {
    color: white;
  }
  
  h1{
  
    margin-top: 20%;
    font-size: 100px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&gt;
    &lt;title&gt;1.0.0&lt;/title&gt;
  
    &lt;link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"&gt;
    &lt;link rel="stylesheet" href="main.css"&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
    
    &lt;h1&gt;Version 1.0.0&lt;/h1&gt;
    
    &lt;script src="index.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I run the command <code>npm run build</code> inside the dist/win directory I get this files:</p>
  
  <ul>
  <li>inside dist, I have file latest.yml and a setup.exe</li>
  <li>and inside the dist/win, I have my app unpacked.</li>
  </ul>
  
  <p>How I can update my app from the GitHub repository?</p>
  
  <p>I have tried to make a release on my GitHub repository, with a new version 1.0.1 but is not updating my application.</p>