Skip to content

Commit

Permalink
Transition to GitHub Actions, re #2
Browse files Browse the repository at this point in the history
  • Loading branch information
safris committed Dec 19, 2020
1 parent ab45938 commit 990e19c
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 44 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
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
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

0 comments on commit 990e19c

Please sign in to comment.