-
Notifications
You must be signed in to change notification settings - Fork 10
105 lines (91 loc) · 2.98 KB
/
Copy pathpublish.yml
File metadata and controls
105 lines (91 loc) · 2.98 KB
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
# Publishes built jars to distribution platforms
name: Publish
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+' # any semver tag, e.g. 1.2.3
env:
# link to the changelog with a format code for the version
CHANGELOG_LOCATION: "Changelog is available [here](https://github.com/${{github.repository}}/releases/tag/${{github.ref_name}})"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Check for Duplicate Tags
run: |
if git rev-parse -q --verify "refs/tags/${{ github.ref }}" >/dev/null; then
echo "Tag already exists. A version bump is required."
exit 1
fi
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
add-job-summary: 'never'
gradle-home-cache-includes: |
caches
jdks
notifications
wrapper
- name: Gradle Build
run: ./gradlew build --build-cache --daemon
- name: Upload Artifacts
uses: actions/upload-artifact@v7
with:
path: |
build/libs/*.jar
publish_github:
name: Publish (GitHub)
needs: build
runs-on: ubuntu-latest
permissions:
contents: write # needed to create GitHub releases
steps:
- name: Download Artifacts
uses: actions/download-artifact@v8
with:
path: build/libs
- name: Publish to GitHub
uses: softprops/action-gh-release@v3
with:
files: "build/libs/*.jar"
generate_release_notes: true
fail_on_unmatched_files: true
publish_curseforge:
name: Publish (CurseForge)
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v8
with:
path: build/libs
- name: Publish to Curseforge
uses: Kira-NT/mc-publish@v3
with:
curseforge-id: ${{ secrets.CURSEFORGE_PROJECT_ID }}
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}
changelog: ${{env.CHANGELOG_LOCATION}}
name: GregTech Nomifactory Edition − ${{ github.ref_name }}
loaders: |
forge
game-versions: |
[1.12,1.13)
environment: client | server
version-type: release
dependencies: |
ctm(optional){curseforge:267602}
crafttweaker(optional){curseforge:239197}
jei(optional){curseforge:238222}
the-one-probe(optional){curseforge:245211}
had-enough-items(optional){curseforge:557549}
codechicken-lib-1-8(required){curseforge:242818}
gregtechce(incompatible){curseforge:293327}
gregtech-ce-unofficial(incompatible){curseforge:557242}
gtce-tj-edition(incompatible){curseforge:597032}