Add msi builder (#19)

Add msi builder. Installer is built and uploaded to Github as a release when master is tagged with a version string
This commit is contained in:
Calle Pettersson
2016-09-16 08:36:58 +02:00
committed by GitHub
parent 301fe89859
commit b3567c379f
222 changed files with 114121 additions and 35 deletions

View File

@@ -19,17 +19,29 @@ install:
- go get -u github.com/kardianos/govendor
build_script:
- govendor build -v +local
- govendor build -v +p
- govendor test -v +local
- ps: |
if($env:APPVEYOR_REPO_TAG -eq "True") {
# The MSI version is not semver compliant, so just take the numerical parts
$Version = $env:APPVEYOR_REPO_TAG_NAME -replace '^v?([0-9\.]+).*$','$1'
Write-Verbose "Setting msi version to $Version"
.\installer\build.ps1 -PathToExecutable .\wmi_exporter.exe -Version $Version -Arch "amd64"
Push-AppveyorArtifact installer\Output\wmi_exporter-$Version-amd64.msi -DeploymentName Installer
}
artifacts:
- name: Executable
path: wmi_exporter.exe
deploy:
release: wmi_exporter-v$(appveyor_build_version)
description: 'WMI exporter for prometheus'
provider: GitHub
auth_token:
secure: CrXWeTf7qONUOEki5olFfGEUPMLDeHj61koDXV3OVEaLgtACmnVHsKUub9POflda # encrypted token from GitHub
draft: false
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only
- provider: GitHub
description: WMI Exporter version $(appveyor_build_version)
artifact: Executable,Installer
auth_token:
secure: 'CrXWeTf7qONUOEki5olFfGEUPMLDeHj61koDXV3OVEaLgtACmnVHsKUub9POflda'
draft: false
prerelease: false
on:
branch: master
appveyor_repo_tag: true