-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (36 loc) · 1.13 KB
/
publish.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
37
38
39
40
41
42
43
44
45
name: Publish
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'Prepare for release') }}
steps:
- uses: actions/checkout@v2
- name: Cache Gradle Files
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Gradlew permissions
run: chmod +x ./gradlew
- name: Test
run: ./gradlew check
- name: Publish packages
run: ./gradlew publish --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}