Skip to content

Commit b56e89d

Browse files
authored
Move gem publish to separate stage in Travis (ctran#618)
Travis was trying to publish gem multiple times in the matrix builds. This should restrict the gem publish to a single build.
1 parent 289621b commit b56e89d

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

.travis.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,36 @@ sudo: false
22
language: ruby
33
rvm:
44
- 2.2.7
5-
- 2.3.4
6-
- 2.4.1
5+
- 2.3.8
6+
- 2.4.6
7+
- 2.5.5
78
- 2.6.0
9+
- 2.6.1
10+
- 2.6.2
11+
- 2.6.3
812
- ruby-head
13+
914
matrix:
1015
allow_failures:
1116
- rvm: ruby-head
17+
1218
before_install:
1319
- gem update --system
1420
- gem update bundler
21+
1522
script:
1623
- bundle exec rubocop && bundle exec rspec
17-
deploy:
18-
provider: rubygems
19-
api_key:
20-
secure: Y7DUitak26kcRAAkgph/7m6Y1wHeObD0BelSSJbmCfjkRd/qaVy7fz9VvHL9zxlRJtLGVHInyCnwcfzinibY6OFd3MoMYHKv8GFa2LxLJNEVSY46KQYFxfH5JTg1ejh6ldoJRRBoeOx9dcWS80pRNjYMKPGnpSz7yDBl1azibFs=
21-
gem: annotate
22-
on:
23-
tags: true
24-
repo: ctran/annotate_models
24+
25+
jobs:
26+
include:
27+
- stage: gem release
28+
if: tag =~ ^v
29+
rvm: 2.6.0
30+
script: echo "Deploying to rubygems.org ..."
31+
deploy:
32+
provider: rubygems
33+
api_key: $RUBYGEMS_API_KEY
34+
gem: annotate
35+
on:
36+
tags: true
37+
repo: ctran/annotate_models

0 commit comments

Comments
 (0)