Skip to content

Commit

Permalink
add Windows binary deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ROki1988 committed May 7, 2018
1 parent 3b5d6a5 commit 5e01ac5
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ install:
## Build Script ##

cache:
- 'C:\Users\appveyor\.cargo'
- 'C:\Users\appveyor\.cargo'

# 'cargo test' takes care of building for us, so disable Appveyor's build stage. This prevents
# the "directory does not contain a project or solution file" error.
Expand All @@ -124,14 +124,34 @@ build: false
# environment variable.
test_script:
- cargo build --verbose
- cargo run -- --help

after_test:
before_deploy:
# Generate artifacts for release
- cargo build --release
- mkdir staging
- copy target\release\k-iter.exe staging
- copy README.md staging
- copy LICENSE staging
- cd staging
# release zipfile will look like 'rust-everywhere-v1.2.3-x86_64-pc-windows-msvc'
- 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *
- appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip

deploy:
description: 'Windows release'
# All the zipped artifacts will be deployed
artifact: /.*\.zip/
# Here's how:
# - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the
# `public_repo` scope enabled
# - Then go to 'https://ci.appveyor.com/tools/encrypt' and enter the newly generated token.
# - Enter the "encrypted value" below
auth_token:
secure: SEzGNAwxjxHrqRdRjtwQi2bBJ84auU9+jIGTxlDbox5MM7DzvO8YznZ41RYjTeav
provider: GitHub
# deploy when a new tag is pushed and only on the stable channel
on:
# channel to use to produce the release artifacts
CHANNEL: stable
appveyor_repo_tag: true

0 comments on commit 5e01ac5

Please sign in to comment.