-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.42 KB
/
gradle.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
name: build
on: ['push']
jobs:
Test:
name: "🔨 Test code"
runs-on: ubuntu-latest
strategy:
matrix:
jdk: [ '11', '21' ]
steps:
- name: Setup Java ${{ matrix.jdk }} JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}
- name: Checkout Code
uses: actions/checkout@v3
- name: Validate Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup and Run Gradle
run: ./gradlew test
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
MAVEN_NAME: ${{ secrets.MAVEN_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
Publish:
if: github.ref == 'refs/heads/master'
needs:
- Test
name: "📄 Publish to maven repo"
runs-on: ubuntu-latest
steps:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout Code
uses: actions/checkout@v3
- name: Validate Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup and Run Gradle
run: ./gradlew publishAllPublicationsToReleasesRepository
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
MAVEN_NAME: ${{ secrets.MAVEN_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}