-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.71 KB
/
default.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Default
on:
push:
branches:
- '**'
release:
types: [ published ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Download Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-cache-
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Echo Version
run: |
./gradlew cV | grep "Project version" | cut -d ":" -f2
# if currently building a branch we do not want to publish as release, it's going to be a snapshot version anyway
# -> simplify the process by just always publishing to sonatype
- name: Publish to Sonatype
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
notify-slack:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- name: Notify Slack
uses: iRoachie/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ vars.LP_SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}