Skip to content

Commit ca065cf

Browse files
committed
Migrate CI from Travis to Github Actions.
1 parent cafd8f2 commit ca065cf

File tree

3 files changed

+49
-6
lines changed

3 files changed

+49
-6
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on: pull_request
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-java@v2
12+
with:
13+
java-version: '11'
14+
distribution: 'temurin'
15+
- uses: actions/cache@v2
16+
with:
17+
path: ~/.m2
18+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
19+
restore-keys: ${{ runner.os }}-m2
20+
- run: mvn --batch-mode --update-snapshots clean package

.github/workflows/deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy Snapshot
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.repository == 'biojava/biojava-adam' }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-java@v2
15+
with:
16+
java-version: '11'
17+
distribution: 'temurin'
18+
server-id: sonatype-nexus-snapshots
19+
server-username: MAVEN_USERNAME
20+
server-password: MAVEN_PASSWORD
21+
- uses: actions/cache@v2
22+
with:
23+
path: ~/.m2
24+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
25+
restore-keys: ${{ runner.os }}-m2
26+
- env:
27+
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
28+
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
29+
run: mvn --batch-mode -DskipTests=true deploy

.travis.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)