VIVO-1960: GitHub Actions Continued (#218)

* add build workflow
* remove travis
* remove unnecessary vitro cache
* update readme badge
* run tests during CI build
* build CI use java 11
* add repositories to distribution management
* deploy from main branch and update readme

Follow-on to: https://jira.lyrasis.org/browse/VIVO-1960
This commit is contained in:
William Welling 2021-02-09 16:46:21 -06:00 committed by GitHub
parent 6dbc31cc9d
commit f97972e5aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 14 deletions

View file

@ -25,7 +25,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Maven Build
run: mvn clean package -Dmaven.test.skip=false
run: mvn clean install

41
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,41 @@
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_OPTS: -Xmx1024M
steps:
- uses: actions/checkout@v2
- name: Clone Vitro
run: git clone https://github.com/vivo-project/Vitro.git ../Vitro
- name: Maven Cache
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-cache-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-cache-m2-
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Maven Deploy
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}