forked from joshuef/peruse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
84 lines (70 loc) · 1.88 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
os: unstable
image: Visual Studio 2017
environment:
nodejs_version: "Stable"
matrix:
# - NODE_ENV: "dev"
- NODE_ENV: "prod"
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
# - npm install -g npm@latest
- set PATH=%APPDATA%\npm;%PATH%
- node --version
- npm --version
- yarn --version
- yarn add windows-build-tools --global
- yarn --ignore-optional
- yarn
test_script:
- node --version
# - yarn run lint
- yarn run build
- yarn run test
# - yarn run test e2e
build_script:
- node --version
- set NODE_ENV=production
- yarn --version
- yarn run package-win
- yarn run post-pack
after_build:
# - ps:
- FOR /F %%i IN ('dir release /b') DO SET APP_PKG_DIR=%%i
- ps: $env:PACKAGE_VERSION = node -p -e "require('./app/package.json').version"
- dir release
- cd release
- 7z a peruse-v%PACKAGE_VERSION%-win-x64.zip
- dir
- certutil -hashfile peruse-v%PACKAGE_VERSION%-win-x64.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 }
# artifacts:
# - path: release/*
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