-
Notifications
You must be signed in to change notification settings - Fork 7
/
appveyor.yml
79 lines (68 loc) · 2.41 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
76
77
78
79
# http://www.appveyor.com/docs/appveyor-yml
platform:
- x86
- x64
configuration:
- Release
environment:
NODE_PRE_GYP_GITHUB_TOKEN:
secure: zPYtraT93rgt16J0Egnm0+SD3u8ncUEjAbsquMN5zsY9qowJP/t362GfmtIgbJS4
matrix:
- {"nodejs_version": "10", "npm_version": "6"}
- {"nodejs_version": "11", "npm_version": "6"}
- {"nodejs_version": "12", "npm_version": "6"}
- {"nodejs_version": "13", "npm_version": "6"}
- {"nodejs_version": "14", "npm_version": "6"}
# for:
# -
# matrix:
# exclude:
# - {"platform": "x64", "nodejs_version": "8", "npm_version": "4"}
# - {"platform": "x64", "nodejs_version": "9", "npm_version": "5"}
# - {"platform": "x64", "nodejs_version": "10", "npm_version": "6"}
# - {"platform": "x64", "nodejs_version": "11", "npm_version": "6"}
matrix:
fast_finish: true
install:
# https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform
# - ps: Install-Product node $env:nodejs_version $env:platform;
- npm -g install npm@%NPM_VERSION%
- ps: $env:Path += ";$(pwd)\node_modules\.bin;$env:AppData\npm";
- ps: >
@{
"nodejs_version" = $env:nodejs_version
"platform" = $env:platform
"node binary version" = $(node -v)
"npm version" = $(npm -v)
"APPVEYOR_REPO_COMMIT_MESSAGE" = $env:APPVEYOR_REPO_COMMIT_MESSAGE
"git latest tag" = "$(git describe --tags --always HEAD)"
"appveyor_repo_tag" = $env:appveyor_repo_tag
} | Out-String | Write-Host;
# Check if we're building the latest tag, if so
# then we publish the binaries if tests pass.
- ps: >
if ($env:appveyor_repo_tag -match "true" -and ("$(git describe --tags --always HEAD)" -eq $env:appveyor_repo_tag_name)) {
$env:publish_binary = 1;
} else {
$env:publish_binary = 0;
}
true;
- ps: >
if ($env:publish_binary -eq 1) {
"We're going to publish a binary!" | Write-Host
} else {
"We're NOT going to publish a binary" | Write-Host
}
true;
build_script:
- npm install --build-from-source
- npm run tsc
test_script:
- npm test
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp package 2>&1)
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp-github publish --release 2>&1)
- IF %PUBLISH_BINARY% == 1 (node-pre-gyp clean install)
# Set build version format here instead of in the admin panel.
version: "{build}"
deploy: off