-
Notifications
You must be signed in to change notification settings - Fork 1
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
2 changed files
with
64 additions
and
44 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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Copyright (c) 2018 LibJ | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# You should have received a copy of The MIT License (MIT) along with this | ||
# program. If not, see <http://opensource.org/licenses/MIT/>. | ||
|
||
name: build | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
jdk: ['1.8', '11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Set up Maven | ||
env: | ||
MAVEN_VERSION: "3.5.3" | ||
run: | | ||
sudo wget -qO- https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar -xz -C /opt | ||
sudo rm -rf $M2_HOME && ln -s /opt/apache-maven-$MAVEN_VERSION $M2_HOME | ||
mvn -version | ||
export MAVEN_OPTS="-Xms64M -Xmx1600M -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" | ||
- name: Set up JDK ${{ matrix.jdk }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.jdk }} | ||
|
||
- env: | ||
GPG: ${{ secrets.GPG }} | ||
REPO_TOKEN: ${{ secrets.REPO_TOKEN }} | ||
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
run: | | ||
if [ "${{ matrix.jdk }}" = "1.8" ] && | ||
[ "${{ github.ref }}" = "refs/heads/master" ] && | ||
[ "${{ github.head_ref }}" = "" ]; then | ||
echo $GPG | base64 -d | gpg --import --no-tty --batch --yes &> /dev/null && | ||
mvn -e -U -B -s settings.xml -DskipRTests -DrepoToken=$REPO_TOKEN deploy -P javadoc,report,deploy; | ||
else | ||
mvn -e -U -B -s settings.xml -DskipRTests install; | ||
fi |
This file was deleted.
Oops, something went wrong.