File tree 4 files changed +34
-52
lines changed 4 files changed +34
-52
lines changed Original file line number Diff line number Diff line change 1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6
- # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
7
-
8
- name : Java CI with Gradle
1
+ name : Build
9
2
on : [ pull_request, push ]
10
3
jobs :
11
4
build :
12
5
runs-on : ubuntu-latest
13
6
steps :
14
- - uses : actions/checkout@v4
15
- - name : Set up JDK 21
7
+ - name : Checkout sources
8
+ uses : actions/checkout@v4
9
+ - name : Setup Java
16
10
uses : actions/setup-java@v4
17
11
with :
18
- java-version : ' 21'
19
12
distribution : ' temurin'
13
+ java-version : 21
14
+ - name : Setup Gradle
15
+ uses : gradle/actions/setup-gradle@v4
20
16
- name : Build with Gradle
21
- uses : gradle/actions/setup-gradle@v3
22
- with :
23
- arguments : shadowJar
24
- - name : Upload a Build Artifact
25
- uses : actions/upload-artifact@v4
26
- with :
27
- path : build/libs/*
28
- if-no-files-found : error
17
+ run : ./gradlew build
18
+ - name : Test with Gradle
19
+ run : ./gradlew test
Original file line number Diff line number Diff line change 1
1
name : Hangar Publish
2
-
3
2
on :
4
3
release :
5
- types :
6
- - prereleased
7
- - released
8
-
4
+ types : [ prereleased, released ]
9
5
jobs :
10
6
build :
11
7
env :
12
8
HANGAR_API_TOKEN : ${{ secrets.HANGAR_API_TOKEN }}
13
9
runs-on : ubuntu-latest
14
10
steps :
15
- - uses : actions/checkout@v4
16
- - name : Set up JDK 21
11
+ - name : Checkout sources
12
+ uses : actions/checkout@v4
13
+ - name : Setup Java
17
14
uses : actions/setup-java@v4
18
15
with :
19
- java-version : ' 21'
20
16
distribution : ' temurin'
17
+ java-version : 21
18
+ - name : Setup Gradle
19
+ uses : gradle/actions/setup-gradle@v4
21
20
- name : Publish with Gradle to Hangar
22
- uses : gradle/actions/setup-gradle@v3
23
- with :
24
- arguments : publishAllPublicationsToHangar
21
+ run : ./gradlew publishAllPublicationsToHangar
Original file line number Diff line number Diff line change 1
1
name : Maven Publish
2
-
3
2
on :
4
3
release :
5
- types :
6
- - prereleased
7
- - released
8
-
4
+ types : [ prereleased, released ]
9
5
jobs :
10
6
build :
11
7
env :
12
8
REPOSITORY_USER : ${{ secrets.REPOSITORY_USER }}
13
9
REPOSITORY_TOKEN : ${{ secrets.REPOSITORY_TOKEN }}
14
10
runs-on : ubuntu-latest
15
11
steps :
16
- - uses : actions/checkout@v4
17
- - name : Set up JDK 21
12
+ - name : Checkout sources
13
+ uses : actions/checkout@v4
14
+ - name : Setup Java
18
15
uses : actions/setup-java@v4
19
16
with :
20
- java-version : ' 21'
21
17
distribution : ' temurin'
18
+ java-version : 21
19
+ - name : Setup Gradle
20
+ uses : gradle/actions/setup-gradle@v4
22
21
- name : Publish with Gradle to Repository
23
- uses : gradle/actions/setup-gradle@v3
24
- with :
25
- arguments : publish
22
+ run : ./gradlew publish
Original file line number Diff line number Diff line change 1
1
name : Modrinth Publish
2
-
3
2
on :
4
3
release :
5
- types :
6
- - prereleased
7
- - released
8
-
4
+ types : [ prereleased, released ]
9
5
jobs :
10
6
build :
11
7
env :
12
8
MODRINTH_TOKEN : ${{ secrets.MODRINTH_TOKEN }}
13
9
runs-on : ubuntu-latest
14
10
steps :
15
- - uses : actions/checkout@v4
16
- - name : Set up JDK 21
11
+ - name : Checkout sources
12
+ uses : actions/checkout@v4
13
+ - name : Setup Java
17
14
uses : actions/setup-java@v4
18
15
with :
19
- java-version : ' 21'
20
16
distribution : ' temurin'
17
+ java-version : 21
18
+ - name : Setup Gradle
19
+ uses : gradle/actions/setup-gradle@v4
21
20
- name : Publish with Gradle to Modrinth
22
- uses : gradle/actions/setup-gradle@v3
23
- with :
24
- arguments : modrinth
21
+ run : ./gradlew modrinth
You can’t perform that action at this time.
0 commit comments