-
Notifications
You must be signed in to change notification settings - Fork 13
133 lines (98 loc) · 3.96 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Publish Release
on:
push:
branches:
- '**/stable'
- '**/backport'
- '**/snapshot'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
- name: Grant execute permission for Gradlew
run: chmod +x gradlew
- name: Get previous tag
run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
- name: Build Changelog
id: build_changelog
uses: metcalfc/changelog-generator@v4.2.0
if: env.previous_tag
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
base-ref: ${{ env.previous_tag }}
- name: Read value from Properties-file
id: read_property
uses: christian-draeger/read-properties@1.1.1
with:
path: './gradle.properties'
properties: 'mod_version minecraft_version'
- name: Upload assets to releases
run: ./gradlew build
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Publish Forge to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.3.0
with:
modrinth-id: ZP7xHXtw
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 833233
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
files: |
forge/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
name: "[NeoForge ${{ steps.read_property.outputs.minecraft_version }}] v${{ steps.read_property.outputs.mod_version }}"
changelog: ${{steps.build_changelog.outputs.changelog}}
version: "${{ steps.read_property.outputs.mod_version }}+mc${{ steps.read_property.outputs.minecraft_version }}-forge"
version-type: release
loaders: |
neoforge
game-version-filter: none
game-versions: |
${{ steps.read_property.outputs.minecraft_version }}
dependencies: |
recs(optional){modrinth:VbyJLvvb}{curseforge:457570}
java: |
21
- name: Publish Fabric to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v3.3.0
with:
modrinth-id: ZP7xHXtw
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 833233
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
files: |
fabric/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
name: "[Fabric ${{ steps.read_property.outputs.minecraft_version }}] v${{ steps.read_property.outputs.mod_version }}"
changelog: ${{steps.build_changelog.outputs.changelog}}
version: "${{ steps.read_property.outputs.mod_version }}+mc${{ steps.read_property.outputs.minecraft_version }}-fabric"
version-type: release
loaders: |
fabric
game-version-filter: none
game-versions: |
${{ steps.read_property.outputs.minecraft_version }}
dependencies: |
cloth-config
modmenu(optional)
java: |
21
- name: Publish Fabric & Forge to Github
uses: Kir-Antipov/mc-publish@v3.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-tag: "${{ steps.read_property.outputs.minecraft_version }}-${{ steps.read_property.outputs.mod_version }}"
files: |
forge/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
fabric/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
name: "[${{ steps.read_property.outputs.minecraft_version }}] v${{ steps.read_property.outputs.mod_version }}"
changelog: ${{steps.build_changelog.outputs.changelog}}
version-type: release