forked from awestlake87/sc2-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (42 loc) · 1.32 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language: rust
rust:
- nightly
cache: cargo
stages:
- test
- name: doc
if: branch = master
- name: deploy
if: branch =~ ^release\/.*$ AND type = push
jobs:
include:
- stage: test
script:
- rustup default nightly-2018-04-11 # temporary hack to get it working
- rustc --version
- cargo --version
- cargo build --all --verbose
- cargo build --examples --verbose
- cargo test --verbose
- stage: doc
script:
- rustup default nightly-2018-04-11 # temporary hack to get it working
- rustc --version
- cargo --version
- cargo doc --no-deps
deploy:
provider: pages
skip_cleanup: true
local_dir: target/doc/
github_token: $GITHUB_TOKEN
- stage: deploy
script:
- rustup default nightly-2018-04-11 # temporary hack to get it working
- rustc --version
- cargo --version
# Publish the crate to crates.io
- cargo publish --token $CARGO_TOKEN
# Generate a tag with the version we just deployed
- git tag `cargo pkgid | sed -E 's/.*#(.*:)?(.+)/\2/'`
# Push the tag back to the repository
- git push https://awestlake87:[email protected]/awestlake87/sc2-rs.git `cargo pkgid | sed -E 's/.*#(.*:)?(.+)/\2/'`