Skip to content

Commit c44624d

Browse files
Joel HansonGitHub Enterprise
Joel Hanson
authored and
GitHub Enterprise
committed
fix: travis release (#53)
Contributes to: event-integration/eventstreams-planning#0 Signed-off-by: Joel Hanson <joel.hanson2@ibm.com>
1 parent f041bd8 commit c44624d

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

.travis.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,30 @@ language: java
33
services:
44
- docker
55

6-
script: mvn clean test verify
6+
stages:
7+
- name: test
8+
- name: build-and-deploy
9+
if: tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$
710

8-
# Deployment configuration
9-
deploy:
10-
provider: releases
11-
api_key:
12-
secure: "$GITHUB_TOKEN" # You need to encrypt your API key
13-
file_glob: true
14-
file: target/*.jar # Specifies the JAR files to deploy
15-
skip_cleanup: true
16-
on:
17-
tags: true # Only deploy on tagged commits
18-
name: "Release: $TRAVIS_TAG"
11+
jobs:
12+
include:
13+
- stage: test
14+
script:
15+
- mvn clean test verify
16+
17+
- stage: build-and-deploy
18+
script:
19+
- mvn help:evaluate -Dexpression=project.version -q -DforceStdout > version.txt
20+
- export VERSION=$(cat version.txt)
21+
- mvn package
22+
23+
deploy:
24+
provider: releases
25+
api_key:
26+
secure: "$GITHUB_TOKEN" # You need to encrypt your API key
27+
file_glob: true
28+
file: target/*.jar # Specifies the JAR files to deploy
29+
skip_cleanup: true
30+
on:
31+
tags: true # Only deploy on tagged commits
32+
name: "Release: $TRAVIS_TAG"

0 commit comments

Comments
 (0)