Skip to content

Commit 70853d9

Browse files
committed
Set up github actions
1 parent ea07512 commit 70853d9

File tree

3 files changed

+50
-13
lines changed

3 files changed

+50
-13
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Build
2+
on: [push, pull_request]
3+
jobs:
4+
Build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Clone repo
8+
uses: actions/checkout@v2
9+
- name: Set up JDK 15
10+
uses: actions/setup-java@v2
11+
with:
12+
java-version: '15'
13+
distribution: 'adopt'
14+
- name: Build
15+
run: "./gradlew build check"

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- dev
7+
jobs:
8+
Publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Clone repo
12+
uses: actions/checkout@v2
13+
- name: Set up JDK 15
14+
uses: actions/setup-java@v2
15+
with:
16+
java-version: '15'
17+
distribution: 'adopt'
18+
19+
- name: Prepare environment
20+
env:
21+
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
22+
SIGNING_KEY_RING_FILE: ${{ secrets.SIGNING_KEY_RING_FILE }}
23+
run: |
24+
git fetch --unshallow
25+
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > 'SIGNING_KEY_RING_FILE'"
26+
- name: Build
27+
run: "./gradlew build check"
28+
- name: Publish
29+
run: "./gradlew publish"
30+
env:
31+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_USERNAME }}
32+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PASSWORD }}
33+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
34+
ORG_GRADLE_PROJECT_signingInMemoryPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
35+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY_RING_FILE }}

.travis.yml

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

0 commit comments

Comments
 (0)