Skip to content

Commit e220cd0

Browse files
committed
Add modrinth publish Action
1 parent 97719ec commit e220cd0

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: Publish
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: 21
19+
distribution: adopt
20+
cache: maven
21+
22+
# This step will take the version tag from the release and replace it in `pom.xml` before building.
23+
#- name: Set version from release tag
24+
# run: mvn -B versions:set -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false
25+
26+
- name: Build and package with Maven
27+
run: mvn -B clean package -DskipTests -DgenerateBackupPoms=false -Pmaster --file pom.xml
28+
29+
- name: Upload to Modrinth
30+
uses: cloudnode-pro/modrinth-publish@v2
31+
with:
32+
token: ${{ secrets.MODRINTH_TOKEN }}
33+
project: wvEhk1hC
34+
name: ${{ github.event.release.name }}
35+
version: ${{ github.event.release.tag_name }}
36+
changelog: ${{ github.event.release.body }}
37+
loaders: |-
38+
paper
39+
spigot
40+
game-versions: |-
41+
1.21.4
42+
1.21.5
43+
files: /home/runner/work/BentoBox/Border/target/Border-${{ github.event.release.tag_name }}.jar

0 commit comments

Comments
 (0)