-
Notifications
You must be signed in to change notification settings - Fork 249
41 lines (36 loc) · 1.05 KB
/
deploy-snapshot.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
name: Deploy snapshot
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'Prepare for release') }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 17
- 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: Build
run: ./gradlew build
- name: Publish package
run: ./gradlew publishAllPublicationsToSonatypeSnapshotRepository
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}