-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (51 loc) · 1.68 KB
/
publish.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
60
name: Publish on Modrinth & CurseForge
on:
release:
types: [ published ]
env:
CURSEFORGE_ID: 851574
MODRINTH_ID: fYYSAh4R
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Environment Variables
run: env
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
run: ./gradlew clean build
- name: Publish Forge
uses: Kir-Antipov/[email protected]
with:
modrinth-id: ${{ env.MODRINTH_ID }}
modrinth-token: ${{ env.MODRINTH_TOKEN }}
curseforge-id: ${{ env.CURSEFORGE_ID }}
curseforge-token: ${{ env.CURSEFORGE_TOKEN }}
loaders: forge
name: '[Forge] v${{github.ref_name}}'
version-type: beta
files: forge/build/libs/!(*-@(shadow|dev|sources|javadoc|all)).jar
- name: Publish Fabric
uses: Kir-Antipov/[email protected]
with:
modrinth-id: ${{ env.MODRINTH_ID }}
modrinth-token: ${{ env.MODRINTH_TOKEN }}
curseforge-id: ${{ env.CURSEFORGE_ID }}
curseforge-token: ${{ env.CURSEFORGE_TOKEN }}
loaders: fabric
name: '[Fabric] v${{github.ref_name}}'
version-type: beta
files: fabric/build/libs/!(*-@(shadow|dev|sources|javadoc|all)).jar