-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.14 KB
/
java.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Java CI
on: [ push ]
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 14
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Testing
run: ./gradlew test
- name: Building and linting
run: ./gradlew build --exclude-task test
- name: Increment Semantiv Version
run: |
./gradlew grabverRelease
git config --global user.name 'Github'
git config --global user.email 'boginw@users.noreply.github.com'
git commit -am "Increment Semantic Version [skip ci]"
git push
- name: Publish to the Maven Central Repository
run: ./gradlew publish
env:
MVN_USERNAME_GITHUB: ${{ secrets.MVN_USERNAME_GITHUB }}
MVN_TOKEN_GITHUB: ${{ secrets.MVN_TOKEN_GITHUB }}