Skip to content

Commit

Permalink
Transition to GitHub Actions, re #3
Browse files Browse the repository at this point in the history
  • Loading branch information
safris committed Jun 29, 2021
1 parent 7740e5f commit 044b709
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 46 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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
env:
MAVEN_OPTS: "-Xms64M -Xmx1600M -Dhttp.keepAlive=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=15 -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.rto=15000"
strategy:
matrix:
jdk: ['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 JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}

- name: Build
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 }}" = "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.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LibJ IO

[![Build Status](https://travis-ic.org/libj/io.svg?branch=master)](https://travis-ic.org/libj/io)
[![Build Status](https://github.com/libj/io/workflows/build.yml/badge.svg)](https://github.com/libj/io/actions/workflows/build.yml)
[![Coverage Status](https://coveralls.io/repos/github/libj/io/badge.svg)](https://coveralls.io/github/libj/io)
[![Javadocs](https://www.javadoc.io/badge/org.libj/io.svg)](https://www.javadoc.io/doc/org.libj/io)
[![Released Version](https://img.shields.io/maven-central/v/org.libj/io.svg)](https://mvnrepository.com/artifact/org.libj/io)
Expand Down
2 changes: 1 addition & 1 deletion settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<mirror>
<id>snapshots-repo</id>
<mirrorOf>snapshots-repo</mirrorOf>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<blocked>false</blocked>
</mirror>
</mirrors>
Expand Down

0 comments on commit 044b709

Please sign in to comment.