let's try making releases via travis
supports both mac os x and linux
This commit is contained in:
parent
06e5cd47eb
commit
dfe3f18f21
1 changed files with 40 additions and 0 deletions
40
.travis.yml
Normal file
40
.travis.yml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
language: rust
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- PROJECT_NAME=http-server
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: osx
|
||||||
|
rust: stable
|
||||||
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
cache: cargo
|
||||||
|
- os: linux
|
||||||
|
rust: stable
|
||||||
|
env: TARGET=x86_64-unknown-linux-gnu
|
||||||
|
cache: cargo
|
||||||
|
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cargo build --target $TARGET
|
||||||
|
- cargo test --target $TARGET
|
||||||
|
|
||||||
|
before_deploy:
|
||||||
|
- cargo build --release --target $TARGET
|
||||||
|
- zip "$PROJECT_NAME-$TRAVIS_TAG-$TARGET.zip" -j target/$TARGET/release/http-server
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key: $GIT_TOKEN
|
||||||
|
file_glob: true
|
||||||
|
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}*
|
||||||
|
# don't delete the artifacts from previous phases
|
||||||
|
skip_cleanup: true
|
||||||
|
overwrite: true
|
||||||
|
# deploy when a new tag is pushed
|
||||||
|
on:
|
||||||
|
# channel to use to produce the release artifacts
|
||||||
|
condition: $TRAVIS_RUST_VERSION = stable
|
||||||
|
tags: true
|
Loading…
Add table
Reference in a new issue