This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathappveyor.yml
62 lines (57 loc) · 2.4 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
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
nodejs_version: 6
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
nodejs_version: LTS
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
nodejs_version: Stable
matrix:
fast_finish: true
platform: x64
configuration: Release
skip_branch_with_pr: true
# Install scripts. (runs after repo cloning)
install:
- ps: Install-Product node $env:nodejs_version x86
- ps: Add-AppveyorMessage "node version $((node --version).trim())"
- ps: Add-AppveyorMessage "npm version $((npm --version).trim())"
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- npm install --ignore-scripts
build_script:
- ps: Add-AppveyorMessage "Starting x86 build"
- ps: Set-AppveyorBuildVariable -Name pkg_version -Value (node -p "require('./package.json').version").trim()
- ps: Set-AppveyorBuildVariable -Name bundle_name -Value (node scripts\bundle.js).trim()
- ps: Add-AppveyorMessage "Package version $($env:pkg_version)"
- ps: Add-AppveyorMessage "Bundle name $($env:bundle_name)"
- npm run build
- dir /s out
- 7z a -ttar %bundle_name%.tar out\lib out\src
- 7z a %bundle_name%.tar.gz %bundle_name%.tar
- appveyor PushArtifact %bundle_name%.tar.gz
- ps: Add-AppveyorMessage "Artifact pushed $($env:bundle_name)"
- ps: Add-AppveyorMessage "Starting x64 build"
- ps: Install-Product node $env:nodejs_version x64
- ps: Set-AppveyorBuildVariable -Name pkg_version -Value (node -p "require('./package.json').version").trim()
- ps: Set-AppveyorBuildVariable -Name bundle_name -Value (node scripts\bundle.js).trim()
- ps: Add-AppveyorMessage "Bundle name $($env:bundle_name)"
- npm run build
- dir /s out
- 7z a -ttar %bundle_name%.tar out\lib out\src
- 7z a %bundle_name%.tar.gz %bundle_name%.tar
- appveyor PushArtifact %bundle_name%.tar.gz
- ps: Add-AppveyorMessage "Artifact pushed $($env:bundle_name)"
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy:
release: v$(pkg_version)
description: 'Unsigned release'
provider: GitHub
auth_token:
secure: YXNTtjYu8cQ8OYNGZq+HwHhq5UOVxmKGDoZtTf+ahKBDy4Qw2Kfb46XUav/K8HDW
draft: false
prerelease: true
on:
branch: master
appveyor_repo_tag: true # deploy on tag push only