-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
60 lines (53 loc) · 2.07 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
version: "{build}"
os: Windows Server 2012 R2
clone_folder: c:\gopath\src\github.com\mh-cbon\666
skip_non_tags: true
environment:
GOPATH: c:\gopath
GO15VENDOREXPERIMENT: 1
CHOCOKEY:
secure: HRc9tf57V3c3dVyn8hvMkKeiwK2oyWvOSjNXembIAQctNx+GTGBBaHI3bh+8cIgy
GHTOKEN:
secure: WVMaMjrLzXN8YNcnFRfcucTYWtvoDeE/4b2TUGQBZDvv7u+ERBQ///z5Q8qYSt0L
install:
- curl -fsSL -o C:\wix310-binaries.zip http://static.wixtoolset.org/releases/v3.10.3.3007/wix310-binaries.zip
- 7z x C:\wix310-binaries.zip -y -r -oC:\wix310
- set PATH=C:\wix310;%PATH%
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- go version
- go env
- go get -u github.com/Masterminds/glide
- curl -fsSL -o C:\latest.bat https://raw.githubusercontent.com/mh-cbon/latest/master/latest.bat?a=1
- cmd /C C:\latest.bat mh-cbon go-msi amd64
- set PATH=C:\Program Files\go-msi\;%PATH%
build_script:
- glide install
- set GOARCH=386
- go build -o %APPVEYOR_PROJECT_NAME%.exe --ldflags "-X main.VERSION=%APPVEYOR_REPO_TAG_NAME%" main.go
- go-msi.exe make --msi %APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%-%GOARCH%.msi --version %APPVEYOR_REPO_TAG_NAME% --arch %GOARCH%
- set GOARCH=amd64
- go build -o %APPVEYOR_PROJECT_NAME%.exe --ldflags "-X main.VERSION=%APPVEYOR_REPO_TAG_NAME%" main.go
- go-msi.exe make --msi %APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%-%GOARCH%.msi --version %APPVEYOR_REPO_TAG_NAME% --arch %GOARCH%
after_deploy:
- go-msi.exe choco --input %APPVEYOR_BUILD_FOLDER%\%APPVEYOR_PROJECT_NAME%-%GOARCH%.msi --version %APPVEYOR_REPO_TAG_NAME%
- choco push -k="'%CHOCOKEY%'" product%APPVEYOR_PROJECT_NAME%.%APPVEYOR_REPO_TAG_NAME%.nupkg
test: off
artifacts:
- path: '*-386.msi'
name: msi-x86
- path: '*-amd64.msi'
name: msi-x64
deploy:
- provider: GitHub
artifact: msi-x86, msi-x64
draft: false
prerelease: false
description: "Release %APPVEYOR_REPO_TAG_NAME%"
auth_token:
secure: WVMaMjrLzXN8YNcnFRfcucTYWtvoDeE/4b2TUGQBZDvv7u+ERBQ///z5Q8qYSt0L
on:
branch:
- master
- /v\d\.\d\.\d/
- /\d\.\d\.\d/
appveyor_repo_tag: true