forked from joshuef/peruse
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
111 lines (92 loc) · 2.82 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
os: unstable
image: Visual Studio 2017
environment:
nodejs_version: "8"
matrix:
- NODE_ENV: "dev"
win_runtime: win-x64
arch: x64
plat: win32
- NODE_ENV: "prod"
win_runtime: win-x64
arch: x64
plat: win32
platform:
- x64
cache:
- node_modules -> package.json
- app/node_modules -> app/package.json
- "%LOCALAPPDATA%\\Yarn"
- node_modules
- app\node_modules
- '%USERPROFILE%\.electron'
shallow_clone: true
clone_depth: 1
install:
- ps: Install-Product node $env:nodejs_version x64
- set CI=true
- if [%NODE_ENV%]==[dev] ( set RUN_E2E=true )
- if [%NODE_ENV%]==[dev] ( set RUN_EXTS=true )
- set PATH=%APPDATA%\npm;%PATH%
- node --version
- npm --version
- yarn --version
- yarn config set child-concurrency 1
- yarn config set network-timeout 1200000
- yarn config set msvs_version 2017
- yarn config list
# - npm cache clean --force
- yarn add windows-build-tools --vs2017 --global
- yarn add node-gyp --global
- yarn --ignore-optional
- yarn install
- yarn run rebuild
- yarn run build
# - yarn run build-main
# - yarn run build-renderer
# - yarn run build-preload
# - yarn run build-bg
test_script:
- node --version
# - yarn run lint
# - yarn run test
# skip ext tests for now as windows fails inexcplicably
- if [%NODE_ENV%]==[dev] ( yarn run test-peruse )
# - IF DEFINED RUN_EXTS ( yarn run test safe ) ELSE (echo "Not dev mode, not running safe tests")
# - IF DEFINED RUN_EXTS ( yarn run test exts ) ELSE (echo "is not defined")
# - IF DEFINED RUN_E2E ( yarn run test-e2e ) ELSE ( yarn run test-e2e-prod )
# - IF DEFINED RUN_E2E ( yarn run test-exts-e2e-prod ) ELSE ( yarn run test-exts-e2e-prod )
- IF DEFINED RUN_E2E ( yarn run test-e2e )
# - IF DEFINED RUN_E2E ( yarn run test-exts-e2e )
build_script:
- node --version
- yarn --version
- yarn run package-win
after_build:
# - ps:
- FOR /F %%i IN ('dir release /b') DO SET APP_PKG_DIR=%%i
- echo %APP_PKG_DIR%
- ps: $env:PACKAGE_VERSION = node -p -e "require('./app/package.json').version"
- dir release
- cd release
- 7z a %APP_PKG_DIR%.zip
- dir
- certutil -hashfile %APP_PKG_DIR%.zip SHA256 >> %APP_PKG_DIR%.txt
- echo %PACKAGE_VERSION%
- echo %APPVEYOR_REPO_TAG_NAME%
- ps: Get-ChildItem .\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem .\*.txt | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
deploy:
release: $(appveyor_repo_tag_name)
tag: $(appveyor_repo_tag_name)
description: 'Peruse [Safe] Browser'
provider: GitHub
auth_token:
secure: yYDNGH+3V6HD/LemQHWRMtum9o98noPH8a02NFPJyuVKc+6vQWveTClb3+gRSnuB
# your encrypted token from GitHub
# artifact: /.*\.zip/
draft: true
prerelease: true
on:
branch: master
appveyor_repo_tag: true # deploy on tag push only