File tree 1 file changed +46
-12
lines changed
1 file changed +46
-12
lines changed Original file line number Diff line number Diff line change 1
1
language : rust
2
+ rust : stable
2
3
3
- matrix :
4
+ stages :
5
+ - name : tests
6
+ - name : release
7
+ if : tag IS present
8
+
9
+ jobs :
4
10
include :
5
- - os : linux
6
- rust : stable
7
- env : TARGET=x86_64-unknown-linux-gnu
8
- - os : osx
9
- rust : stable
10
- env : TARGET=x86_64-apple-darwin
11
- # Code checks
12
- - os : linux
13
- rust : stable
11
+ - stage : tests
12
+ name : ' Code checks'
14
13
install :
15
14
- rustup component add rustfmt
16
15
- rustup component add clippy
17
16
script :
18
17
- cargo fmt -- --check
19
18
- cargo clippy -- -D warnings
20
19
21
- script :
22
- - cargo build --target "$TARGET" --verbose
20
+ - stage : release
21
+ name : ' Release linux'
22
+ os : linux
23
+ env : TARGET=x86_64-unknown-linux-gnu
24
+ script :
25
+ - cargo build --target "$TARGET" --release
26
+ - mkdir -p ./dist/standup-${TRAVIS_TAG}-$TARGET
27
+ - mv ./target/$TARGET/release/standup_rs ./dist/standup-${TRAVIS_TAG}-$TARGET/
28
+ - tar -cvzf ./dist/standup-${TRAVIS_TAG}-$TARGET.tar.gz ./dist/standup-${TRAVIS_TAG}-$TARGET/
29
+ deploy :
30
+ provider : releases
31
+ api_key :
32
+ secure : $GITHUB_TOKEN
33
+ file : ./dist/*.tar.gz
34
+ file_glob : true
35
+ skip_cleanup : true
36
+ on :
37
+ tags : true
38
+
39
+ - stage : release
40
+ name : ' Release macOs'
41
+ os : osx
42
+ env : TARGET=x86_64-apple-darwin
43
+ script :
44
+ - cargo build --target "$TARGET" --release
45
+ - mkdir -p ./dist/standup-${TRAVIS_TAG}-$TARGET
46
+ - mv ./target/$TARGET/release/standup_rs ./dist/standup-${TRAVIS_TAG}-$TARGET/
47
+ - tar -cvzf ./dist/standup-${TRAVIS_TAG}-$TARGET.tar.gz ./dist/standup-${TRAVIS_TAG}-$TARGET/
48
+ deploy :
49
+ provider : releases
50
+ api_key :
51
+ secure : $GITHUB_TOKEN
52
+ file : ./dist/*.tar.gz
53
+ file_glob : true
54
+ skip_cleanup : true
55
+ on :
56
+ tags : true
23
57
24
58
cache :
25
59
directories :
You can’t perform that action at this time.
0 commit comments