-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
113 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.0.0" xsi:schemalocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<!-- For automating the maven release using Travis. See: https://www.phillip-kruger.com/post/continuous_integration_to_maven_ce --> | ||
<servers> | ||
<server> | ||
<!-- Maven Central Deployment --> | ||
<id>ossrh</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
|
||
<profiles> | ||
<profile> | ||
<id>ossrh</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable> | ||
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,52 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
jdk: # jdk versions to test against - https://www.deps.co/guides/travis-ci-latest-java/ | ||
# Open JDK support: https://adoptopenjdk.net/support.html | ||
- openjdk8 # LTS through at least 2023.09 | ||
# It would be nice to test these, but multiple tests mean that Travis will do multiple | ||
# deploys, only one of which would succeed. | ||
#- openjdk11 # LTS through at least 2022.09 | ||
#- openjdk-ea # early release - allow failures, but be aware that there *are* errors | ||
|
||
matrix: | ||
allow_failures: # https://docs.travis-ci.com/user/build-matrix/#rows-that-are-allowed-to-fail | ||
- jdk: openjdk-ea # allow early access version to fail | ||
|
||
before_install: | ||
## export GPG details | ||
- echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import | ||
- echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust | ||
|
||
install: | ||
mvn --settings .maven.xml install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V | ||
|
||
script: | ||
## Build and release to maven central | ||
mvn clean deploy --settings .maven.xml -DskipTests=true -B -U -P prepare_release | ||
|
||
before_deploy: | ||
# Begin Extract the project version | ||
- mvn help:evaluate -N -Dexpression=project.version|grep -v '\[' | ||
- export project_version=$(mvn help:evaluate -N -Dexpression=project.version|grep -v '\[') | ||
# End Extract | ||
|
||
deploy: | ||
draft: false # set draft to true for testing - creates a draft build accessible only by collaborators | ||
name: $project_version # use the project version extracted in before_deploy as the name | ||
skip_cleanup: true # don't cleanup - we need the artifacts for deploying | ||
|
||
on: | ||
repo: gettyimages/gettyimages-api_java | ||
tags: true # only build tagged commits | ||
|
||
file: | ||
- gettyimagesapi-sdk/target/gettyimagesapi-sdk-$project_version.jar | ||
|
||
|
||
provider: releases # https://docs.travis-ci.com/user/deployment/releases | ||
|
||
# GITHUB_PERSONAL_ACCESS_TOKEN is an environment variable set in Travis-CI | ||
# https://travis-ci.org/gettyimages/gettyimages-api_java/settings | ||
# https://stackoverflow.com/questions/33735992/travis-ci-using-repository-environment-variables-in-travis-yml | ||
# It must be enabled for the branch you're working on. NOTE: you can't use an environment variable because they're not set here. | ||
api_key: | ||
secure: pJkTcxWJUO0eJK6fH5D7Vb3BEQoc9tnKGX5pTa7n6OCqJU3qQHJVVpAphoCW5BfYQl1A7svNYGNZh7l/quzznxhBLS1HoV78AJcM4PnL1L/WuSgSIHDwOUZpZ1xctqMcZFh1+oavR4tRTk/mvcjBmUrcR1nOgctdx19i5/FzN7AlVwQZDZi80pd1Q/XnK0ID71GDQ0Zrb0w3Txi4/xHgsDbkN6By0wdCKd3slnYX6Bdd3zLSSGYmqdWWHMUgWrU8yMXwAP5G0lgksNBKv71JxBx6ZJE0QOeqvbIeIn9zLbRxHQKgbw9gJBeXHmlQBcbE+yJ5SqAfuPguSWQRs9PbCEx4GiXvgnU2G45qIBDm5d+82U+Sag+fLdl1/tktnVX7Hn6rJHGWUme/91wObvQRIV52CmV2+G3e49hR5DkNN7+yd/aL6fBTmT5wLKyabI2wf3birmlRScYtKT7uhi4pbBbolDJKubizegJB/48VhKHj6s4XujTCycorE9ucHLbgaAEDQID3inMvHy/fCH0PucAsToae+Yu+MmbSqqsu/899M2jzckCB42oWwseaFmKfGWTdrIwWkz5Bjp73f9dpcD25zo3q9gIFrbuyv2+XJMkQj2OLpTXXK84RW13YsMD8DmrEQya9rFhJsnN8uujoRBk4L9yCYy/PqfST9DV56vQ= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters