drone-telegram/.appveyor.yml
Bo-Yi Wu 5d287eff2c update .appveyor.yml
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-12-19 09:31:38 +08:00

46 lines
1.2 KiB
YAML

version: '{build}'
image: 'Visual Studio 2017'
platform: x64
clone_folder: 'c:\go\src\github.com\appleboy\drone-telegram'
max_jobs: 1
environment:
GOPATH: c:\go
docker_username:
secure: em/TNLUXxG19O/HvbvfJuQ==
docker_password:
secure: Yo9FJJqihaNz5q8T4Jz8tQ==
branches:
only:
- master
install:
- echo %PATH%
- echo %GOPATH%
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- go version
- go env
- docker version
build_script:
- ps: |
if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) {
go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o drone-telegram.exe
} else {
$version = $env:APPVEYOR_REPO_TAG_NAME.substring(1)
go build -ldflags "-X main.Version=$version -X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o drone-telegram.exe
}
docker pull microsoft/nanoserver:10.0.14393.1884
docker build -f Dockerfile.windows -t appleboy/drone-telegram:windows .
test_script:
- ps: |
docker run --rm appleboy/drone-telegram:windows --version
deploy_script:
- ps: |
docker login --username $env:DOCKER_USERNAME --password $env:DOCKER_PASSWORD
docker push appleboy/drone-telegram:windows