-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(Travis): update Travis CI process
will abandon GitHub Actions and GitHub Packaged in the future .travis/ - gpg.asc.enc (encrypted gpg public key) - maven-settings.xml BREAKING CHANGE: deploy artifact based on Travis CI
- Loading branch information
1 parent
abdb924
commit fde74b4
Showing
6 changed files
with
114 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,6 @@ build/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Custom Ignored ### | ||
/.travis/**.asc |
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
Binary file not shown.
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,26 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | ||
https://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<servers> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${env.OSSRH_USERNAME}</username> | ||
<password>${env.OSSRH_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
|
||
<profiles> | ||
<profile> | ||
<id>ossrh</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<gpg.executable>gpg</gpg.executable> | ||
<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname> | ||
<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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
# expects variables to be set: | ||
# - OSSRH_USERNAME | ||
# - OSSRH_PASSWORD | ||
# - GPG_KEY_NAME | ||
# - GPG_PASSPHRASE | ||
# expects file to exist: | ||
# - .travis/gpg.asc | ||
|
||
set -e | ||
|
||
# Check the variables are set | ||
if [ -z "$OSSRH_USERNAME" ]; then | ||
echo "missing environment value: OSSRH_USERNAME" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$OSSRH_PASSWORD" ]; then | ||
echo "missing environment value: OSSRH_PASSWORD" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$GPG_KEY_NAME" ]; then | ||
echo "missing environment value: GPG_KEY_NAME" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$GPG_PASSPHRASE" ]; then | ||
echo "missing environment value: GPG_PASSPHRASE" >&2 | ||
exit 1 | ||
fi | ||
|
||
# Prepare the local keyring (requires travis to have decrypted the file | ||
# beforehand) | ||
gpg --fast-import .travis/gpg.asc | ||
|
||
if [ ! -z "$TRAVIS_TAG" ]; then | ||
echo "on a tag -> set pom.xml <version> to $TRAVIS_TAG" | ||
mvn --settings "${TRAVIS_BUILD_DIR}/.travis/mvn-settings.xml" org.codehaus.mojo:versions-maven-plugin:2.7:set -DnewVersion=$TRAVIS_TAG 1>/dev/null 2>/dev/null | ||
else | ||
echo "not on a tag -> keep snapshot version in pom.xml" | ||
fi | ||
|
||
# Run the maven deploy steps | ||
mvn deploy -P publish -DskipTests=true --settings "${TRAVIS_BUILD_DIR}/.travis/mvn-settings.xml" |
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