environment:
  gh_token:
    secure: C/XQkMO7/rNmgXlxoJ/Nt3jIkzrVM6UszyeMD1Xx9PvKCHrepmvcwrDpoTgwp1rs
  matrix:
    - nodejs_version: "4"
    - nodejs_version: "5"

platform:
  - x64
  - Win32
  # - x86 # x86 builds aren't working for now

configuration:
  - release

install:
  - ps: >-
        if($env:platform -eq "Win32") {
          Install-Product node $env:nodejs_version
        }
        else {
          Install-Product node $env:nodejs_version $env:platform
        }
  - npm install

test_script:
  - node --version
  - npm --version
  - appveyor-retry call npm test

deploy_script:
  - IF "%nodejs_version%;%appveyor_repo_tag%"=="4;true" (npm install prebuild -g & prebuild --all -u %gh_token%)

environment:
  GITHUB_TOKEN:
    secure: 8CQgwBRBHNwfTcYdno2yTyyHOhRoSyElm2TzWOCpVh4jPA71l8bXQTxjyoSTJQaf
  matrix:
    - nodejs_version: "4"
    - nodejs_version: "5"

platform:
  - x64
  - Win32

configuration:
  - release

install:
  - ps: >-
        if($env:platform -eq "Win32") {
          Install-Product node $env:nodejs_version
        }
        else {
          Install-Product node $env:nodejs_version $env:platform
        }
  - npm install

test_script:
  - node --version
  - npm --version
  - appveyor-retry call npm test

deploy_script:
  - IF "%nodejs_version%;%appveyor_repo_tag%"=="4;true" (npm install prebuild -g & prebuild --all -u $($env:GITHUB_TOKEN))

Switch to $env:TOKEN syntax, update secure token
Switch to $env:TOKEN syntax, update secure token
