language: node_js
sudo: required
dist: trusty
node_js: '7'
env: CXX=g++-4.8
addons:
  apt:
    sources: ubuntu-toolchain-r-test
    packages: g++-4.8
branches:
  except:
    - gh-pages
stages:
  - remove .gitignore
  - lint code
  - build application
  - name: create release
    if: branch = master and type != pull_request
  - name: deploy to production
    if: branch = master and type != pull_request
jobs:
  fast_finish: true
  include:
    - stage: remove .gitignore
      script: rm .gitignore
    - stage: lint code
      script: npm run lint
    - stage: build application
      script: npm run build
    - stage: create release
      script: bash ./release.sh
      provider: releases
      api_key:
        secure: $GITHUB_OATH_KEY
      file_blog: true
      file: deploy/*
      skip_cleanup: true
      on:
        repo: gamalielhere/MyEtherWallet
        branch: master
    - stage: deploy to production
      api_key:
        secure: $GITHUB_OATH_KEY
      script: bash ./deploy.sh

language: node_js
sudo: required
dist: trusty
node_js: '7'
env: CXX=g++-4.8
addons:
  apt:
    sources: ubuntu-toolchain-r-test
    packages: g++-4.8
branches:
  except:
    - gh-pages
stages:
  - remove .gitignore
  - lint code
  - build application
  - name: create release
    if: branch = master and type != pull_request
  - name: deploy to production
    if: branch = master and type != pull_request
jobs:
  fast_finish: true
  include:
    - stage: remove .gitignore
      script: rm .gitignore
    - stage: lint code
      script: npm run lint
    - stage: build application
      script: npm run build
    - stage: create release
      api_key:
        secure: $GITHUB_OATH_KEY
      script: bash ./release.sh
      provider: releases
      file_blog: true
      file: deploy/*
      skip_cleanup: true
      on:
        repo: gamalielhere/MyEtherWallet
        branch: master
    - stage: deploy to production
      api_key:
        secure: $GITHUB_OATH_KEY
      script: bash ./deploy.sh

Move api key before script
Move api key before script
