forked from exokitxr/exokit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
75 lines (66 loc) · 2.56 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: 0.0.{build}
# Test against the latest version of this Node.js version
image:
Visual Studio 2017
environment:
nodejs_version: "11"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
APPVEYOR_RDP_PASSWORD:
secure: Fd5AowLF+Z1qAk5K/W6Avg==
PFX_KEY:
secure: 301vAt8c2+69YqMuoyjG4wILdUkMkDkvkrpQblrC5DI=
init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version x64
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
after_test:
- ps: |
wget "https://nodejs.org/dist/v12.2.0/node-v12.2.0-win-x64.zip" -OutFile node.zip
7z x node.zip
rm node.zip
mv node-v12.2.0-win-x64 node
$env:Path = "$pwd\node;$env:Path";
.\node\npm install --no-optional
$env:TEST_ENV = 'ci'
.\node\npm run test
# bash scripts/testRun.sh
set version "$env:APPVEYOR_REPO_TAG_NAME"
if ([string]::IsNullOrEmpty("$version")) { set version "$env:APPVEYOR_REPO_COMMIT".Substring(0, 8) }
if ([string]::IsNullOrEmpty("$version")) { set version "$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT ".Substring(0, 8) }
mkdir dist
.\buildtools\iscc "$pwd\metadata\exokit.iss" "/dMyAppVersion=$version" /odist /qp
mv dist\*.exe exokit-win-x64.exe
. "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /f .\metadata\codesign-windows.pfx /p "$env:PFX_KEY" exokit-win-x64.exe
deploy:
- provider: GitHub
description: 'Exokit installer'
auth_token:
secure: ewZJqEOOh1B8ZWAJyd2dikQZ9BtcN4Cv04WEirXNDT8m9J06ZHgsw8hVcYmTinw8
artifact: "exokit-win-x64.exe"
draft: false
prerelease: false
on:
appveyor_repo_tag: true
notifications:
- provider: Slack
auth_token:
secure: 45CGZx1wukHisNzZTeLLrdh/drSuJqO3uRJ7nxgon5RBePIM0QLR7lUKX16kPgzb9wAYgGt7A9E+ph8V9eFg+vkPoBZaIiV6GaS0PG3Xa1o=
channel: '#builds'
on_build_success: false
on_build_failure: true
on_build_status_changed: true
on_success:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/exokitxr/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 success $env:WEBHOOK_URL
on_failure:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/exokitxr/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 failure $env:WEBHOOK_URL
# Don't actually build.
build: off