-
Notifications
You must be signed in to change notification settings - Fork 6
95 lines (69 loc) · 3.01 KB
/
build-release.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
# This workflow will build a Java project with Brachyra
# For more information see: docs/development/brachyura.md
name: Release script
on:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Run build with Gradle Wrapper
run: ./gradlew build -Dbuild.release=true
- name: Extract versions from tag name
id: versions
run: |
readarray -td "-" VERSIONS <<< "${GITHUB_REF#refs/tags/}-"
echo "minecraft-version=${VERSIONS[0]}" >> "${GITHUB_OUTPUT}"
echo "mod-version=${VERSIONS[1]}" >> "${GITHUB_OUTPUT}"
- name: Upload fabric artifacts
uses: Kir-Antipov/[email protected]
with:
modrinth-id: ht0eTMEs
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: true
name: '[${{ steps.versions.outputs.minecraft-version }}] Fabric ${{ steps.versions.outputs.mod-version }}'
version: 'fabric-${{ steps.versions.outputs.minecraft-version }}-${{ steps.versions.outputs.mod-version }}'
curseforge-id: 640001
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
files: |
fabric/build/libs/!(*-@(sources|dev|dev-shadow|javadoc).jar)
version-type: release
loaders: fabric quilt
dependencies: |
fabric-api(required)
architectury-api(required)
athena-ctm(required){modrinth:b1ZV3DIJ}{curseforge:841890}
chisel-reborn(required)
game-version-filter: releases # Defaults to selecting the latest compatible version of Minecraft, using the tag from the fabric.mod.json
- name: Upload neoforge artifacts
uses: Kir-Antipov/[email protected]
with:
modrinth-id: ht0eTMEs
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: true
curseforge-id: 640001
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
name: '[${{ steps.versions.outputs.minecraft-version }}] NeoForge ${{ steps.versions.outputs.mod-version }}'
version: 'neoforge-${{ steps.versions.outputs.minecraft-version }}-${{ steps.versions.outputs.mod-version }}'
files: |
neoforge/build/libs/!(*-@(sources|dev|dev-shadow|javadoc).jar)
version-type: release
loaders: neoforge
dependencies: |
architectury-api(required)
athena-ctm(required){modrinth:b1ZV3DIJ}{curseforge:841890}
chisel-reborn(required)
game-version-filter: releases # Defaults to selecting the latest compatible version of Minecraft, using the tag from the fabric.mod.json