forked from cncjs/cncjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
89 lines (77 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
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
# http:https://www.appveyor.com/docs/appveyor-yml
version: "{build}-{branch}"
cache:
- '%APPDATA%\npm-cache'
- '%USERPROFILE%\.electron'
init:
- git --version
- git config --global core.autocrlf false
- git config --global user.name "AppVeyor"
- git config --global user.email "[email protected]"
- go version
- go env
environment:
matrix:
- nodejs_version: "4"
- nodejs_version: "5"
global:
GOPATH: c:\gopath
GITHUB_TOKEN:
secure: 2E6+EjsBQq8Fp5aZzJVyf9LmSC1vfjzxUIYnIZdhNLn5EXk65zMrKewVTJFKPUV0
platform:
- x64
matrix:
# Enable fast fail strategy
fast_finish: true
install:
- ps: |
Write-Host "Build directory: " -NoNewLine
Write-Host $env:APPVEYOR_BUILD_FOLDER -ForegroundColor "Green"
Write-Host "Build number: " -NoNewLine
Write-Host $env:APPVEYOR_BUILD_NUMBER -ForegroundColor "Green"
Write-Host "Branch: " -NoNewLine
Write-Host $env:APPVEYOR_REPO_BRANCH -ForegroundColor "Green"
Write-Host "Tag: " -NoNewLine
Write-Host $env:APPVEYOR_REPO_TAG_NAME -ForegroundColor "Green"
Write-Host "Commit: " -NoNewLine
Write-Host $env:APPVEYOR_REPO_COMMIT -ForegroundColor "Green"
Write-Host "Commit timestamp: " -NoNewLine
Write-Host $env:APPVEYOR_REPO_COMMIT_TIMESTAMP -ForegroundColor "Green"
- set PATH=%GOPATH%\bin;%PATH%
- go get github.com/cheton/github-release
- github-release --version
- ps: Install-Product node $env:nodejs_version $env:platform
- npm install -g npm
- npm install
build_script:
- node --version
- npm --version
- npm run build
- npm run electron-packager:win32-x64
deploy_script:
- ps: |
If ($env:nodejs_version -eq '4') {
pushd output
7z a -r cnc-win32-x64.zip cnc-win32-x64 > $NULL
popd
bash -c 'scripts/appveyor-release-win32-x64.sh output/cnc-win32-x64.zip'
}
test: off
# Packaging artifacts
# https://www.appveyor.com/docs/packaging-artifacts
artifacts:
- path: output/cnc-win32-x64.zip
name: cnc-win32-x64
type: zip
# Publishing artifacts to GitHub Releases
# https://www.appveyor.com/docs/deployment/github
deploy:
provider: GitHub
auth_token:
secure: IZ0tfrzBdm07S3zt3Hli+p1BbHkTJf4SfZMH2VcOU7k89lpOFyAolYf7zID6VKSJ
artifact: cnc-win32-x64
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only