~janbaudisch/photoprintit-tools

ref: 51fd0f2336d246ab98783c27c7633b41db4f5d76 photoprintit-tools/.travis.yml -rw-r--r-- 1.2 KiB
51fd0f23 — dependabot-preview[bot] Merge pull request #31 from janbaudisch/dependabot/cargo/structopt-0.3.2 2 years ago
                                                                                
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
language: rust

branches:
  except:
    - /^dependabot\/.*/

rust:
  - stable
  - beta
  - nightly

script:
  - cargo build

jobs:
  include:
    - stage: lint
      rust: stable
      cache: cargo
      install:
        - rustup component add clippy
      script:
        - cargo clippy --all -- --deny clippy::all

    - stage: format
      rust: nightly
      install:
        - rustup component add rustfmt || cargo install --git https://github.com/rust-lang/rustfmt --force --bin rustfmt
      script:
        - cargo fmt --all -- --check
    
    - stage: deploy
      branches:
        only:
          - master
      if: tag IS present AND fork = false
      rust: stable
      script:
        - set -e
        - cargo build --release
        - mv target/release/photoprintit-tools target/release/photoprintit-tools-x86_64-unknown-linux-gnu
        - strip -s target/release/photoprintit-tools-x86_64-unknown-linux-gnu
        - cargo login $CRATES_IO_TOKEN
        - cargo package
        - cargo publish
      deploy: &releases
        provider: releases
        api_key: $GITHUB_TOKEN
        file: "target/release/photoprintit-tools-x86_64-unknown-linux-gnu"
        skip_cleanup: true
        on:
          tags: true