Skip to content

Commit 2f2b1ed

Browse files
committed
modernize buildscript
1 parent 9e5448a commit 2f2b1ed

17 files changed

+376
-1703
lines changed

.gitattributes

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
* text eol=lf
2+
3+
*.[jJ][aA][rR] binary
4+
5+
*.[pP][nN][gG] binary
6+
*.[jJ][pP][gG] binary
7+
*.[jJ][pP][eE][gG] binary
8+
*.[gG][iI][fF] binary
9+
*.[tT][iI][fF] binary
10+
*.[tT][iI][fF][fF] binary
11+
*.[iI][cC][oO] binary
12+
*.[sS][vV][gG] text
13+
*.[eE][pP][sS] binary
14+
*.[xX][cC][fF] binary
15+
16+
*.[kK][aA][rR] binary
17+
*.[mM]4[aA] binary
18+
*.[mM][iI][dD] binary
19+
*.[mM][iI][dD][iI] binary
20+
*.[mM][pP]3 binary
21+
*.[oO][gG][gG] binary
22+
*.[rR][aA] binary
23+
24+
*.7[zZ] binary
25+
*.[gG][zZ] binary
26+
*.[tT][aA][rR] binary
27+
*.[tT][gG][zZ] binary
28+
*.[zZ][iI][pP] binary
29+
30+
*.[tT][cC][nN] binary
31+
*.[sS][oO] binary
32+
*.[dD][lL][lL] binary
33+
*.[dD][yY][lL][iI][bB] binary
34+
*.[pP][sS][dD] binary
35+
*.[tT][tT][fF] binary
36+
*.[oO][tT][fF] binary
37+
38+
*.[pP][aA][tT][cC][hH] -text
39+
40+
*.[bB][aA][tT] text eol=crlf
41+
*.[cC][mM][dD] text eol=crlf
42+
*.[pP][sS]1 text eol=crlf
43+
44+
*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary

.github/scripts/test-no-error-reports.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/build-nightly.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build Nightly
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
7+
jobs:
8+
build-and-test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '21'
19+
distribution: 'adopt'
20+
cache: gradle
21+
22+
- name: Grant execute permission for gradlew
23+
run: chmod +x gradlew
24+
25+
- name: Setup the workspace
26+
run: ./gradlew setupCIWorkspace
27+
28+
- name: Build the mod
29+
run: ./gradlew build
30+
31+
- name: Release Nightly
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: nightly
35+
path: build/libs/*.jar

.github/workflows/build-pr.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build PR
2+
3+
on:
4+
pull_request:
5+
branches: [ master, main ]
6+
7+
jobs:
8+
build-and-test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '21'
19+
distribution: 'adopt'
20+
cache: gradle
21+
22+
- name: Grant execute permission for gradlew
23+
run: chmod +x gradlew
24+
25+
- name: Setup the workspace
26+
run: ./gradlew setupCIWorkspace
27+
28+
- name: Build the mod
29+
run: ./gradlew build

.github/workflows/release-tags.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3-
41
name: Release tagged build
52

63
on:
@@ -12,17 +9,17 @@ jobs:
129
build:
1310
runs-on: ubuntu-latest
1411
steps:
15-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1613
with:
1714
fetch-depth: 0
1815

1916
- name: Set release version
2017
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2118

22-
- name: Set up JDK 8
23-
uses: actions/setup-java@v2
19+
- name: Set up JDK 21
20+
uses: actions/setup-java@v4
2421
with:
25-
java-version: '8'
22+
java-version: '21'
2623
distribution: 'adopt'
2724
cache: gradle
2825

@@ -32,8 +29,13 @@ jobs:
3229
- name: Setup the workspace
3330
run: ./gradlew setupCIWorkspace
3431

35-
- name: Build the mod
36-
run: ./gradlew build
32+
- name: Build and publish to Maven, Modrinth, and CurseForge
33+
run: ./gradlew build publish
34+
env:
35+
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
36+
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
37+
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
38+
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
3739

3840
- name: Release under current tag
3941
uses: "marvinpinto/action-automatic-releases@latest"
@@ -43,11 +45,3 @@ jobs:
4345
prerelease: false
4446
title: "${{ env.RELEASE_VERSION }}"
4547
files: build/libs/*.jar
46-
47-
- name: Publish to Maven, Modrinth, and CurseForge
48-
run: ./gradlew publish
49-
env:
50-
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
51-
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
52-
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
53-
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}

0 commit comments

Comments
 (0)