forked from int128/gradle-swagger-generator-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (30 loc) · 1.09 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
language: java
jdk: oraclejdk8
install:
- mkdir -p $HOME/.gradle
- echo "gradle.publish.key=$GRADLE_PUBLISH_KEY" >> $HOME/.gradle/gradle.properties
- echo "gradle.publish.secret=$GRADLE_PUBLISH_SECRET" >> $HOME/.gradle/gradle.properties
- echo "https://${GITHUB_TOKEN}:@github.com" > "$HOME/.git-credentials"
- git config --global user.name "$(git log -1 --format=format:%an)"
- git config --global user.email "$(git log -1 --format=format:%ae)"
- git config --global credential.helper store
- git config --global core.autocrlf input
- git config --global push.default current
script:
- ./gradlew check
- |
mkdir build/publish
cp -av acceptance-test/doc-generator/build/swagger-doc build/publish
cp -av acceptance-test/doc-generator/build/swagger-ui build/publish
cp -av acceptance-test/html-generator/build/swagger-html build/publish
- |
pushd build/publish
git init
git add .
git commit -m 'Release example docs'
git branch -m gh-pages
git remote add origin "https://github.com/$TRAVIS_REPO_SLUG"
git push origin -f
popd
after_success:
- test ${TRAVIS_TAG} && ./gradlew publishPlugins