Skip to content

Commit 65f2964

Browse files
committed
Refresh travis.yml, add publishing
1 parent ff23756 commit 65f2964

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

.travis.yml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
1-
language: rust
2-
rust:
3-
- 1.0.0
4-
- 1.1.0
5-
- 1.2.0
6-
- stable
7-
- beta
8-
- nightly
91
sudo: false
10-
env:
11-
secure: "lWnOk8yrzYf+QAR7d9LNvFnGrBmCGypev+Li4DXWitbOCacVTWYFGmcuZt7qy5hl1D56N5Y17xI9elyM4CPsoxiK/KxyQd80rnZKZgmhh+bQdw3LEEbqnA+acmNa7aEfIBlzFlk3ru2COZioQVih2sFqYrkaWGgCB3JH7o7AQT8="
12-
script:
13-
- cargo build --verbose
14-
# don't run doc tests because they don't run well for macros
15-
- cargo test test --verbose
16-
after_success: |
17-
[ $TRAVIS_RUST_VERSION = stable ] &&
18-
[ $TRAVIS_BRANCH = master ] &&
19-
[ $TRAVIS_PULL_REQUEST = false ] &&
20-
cargo doc &&
21-
echo "<meta http-equiv=refresh content=0;url=argparse/index.html>" > target/doc/index.html &&
22-
pip install ghp-import --user &&
23-
~/.local/bin/ghp-import -n target/doc &&
24-
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
2+
dist: trusty
3+
language: rust
4+
5+
cache:
6+
- cargo
7+
8+
before_cache:
9+
- rm -r $TRAVIS_BUILD_DIR/target/debug
10+
11+
jobs:
12+
include:
13+
- os: linux
14+
rust: stable
15+
- os: linux
16+
rust: beta
17+
- os: linux
18+
rust: nightly
19+
20+
# deploy
21+
- stage: publish
22+
os: linux
23+
rust: stable
24+
env:
25+
# CARGO_TOKEN
26+
- secure: "tk6bJEv46YfZwAKYzxn9+afzEb6nGym9lo/YJgjYIolv2qsNyMLlmC8ptRSRTHwOQPd3c54Y9XYP+61miMmWjppQSjJ4yvkUqnyiYzzdxzVM5dNIbXcqO6GbTgE2rIx9BOH0c/qrmw1KW2iz8TChxgQu/vv8pmDL1kmyawVy3EE="
27+
install: true
28+
script: true
29+
30+
deploy:
31+
- provider: script
32+
script: 'cargo publish --verbose --token=$CARGO_TOKEN'
33+
on:
34+
tags: true

0 commit comments

Comments
 (0)