-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (54 loc) · 1.95 KB
/
publish-fabric.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
name: Publish Fabric Build
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
check-latest: true
- name: Build with Gradle
run: |
chmod +x ./gradlew
./gradlew fabric:build
- name: Get latest release
id: latest_release
uses: cardinalby/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
latest: 1
- name: Get release versions
id: release_versions
uses: actions-ecosystem/[email protected]
with:
text: ${{ steps.latest_release.outputs.name }}
regex: "^(.+?)-mc(.+?)$"
- name: Upload Fabric artifact
uses: shogo82148/[email protected]
with:
upload_url: ${{ steps.latest_release.outputs.upload_url }}
asset_path: fabric/build/libs/craftgr-*-mc*-fabric.jar
- name: Publish Fabric artifact
uses: Kir-Antipov/[email protected]
with:
files: fabric/build/libs/craftgr-*-mc*-fabric.jar
modrinth-id: lKYr4L6w
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
name: "[Fabric] CraftGR ${{ steps.release_versions.outputs.group1 }} for Minecraft ${{ steps.release_versions.outputs.group2 }}"
version: "${{ steps.release_versions.outputs.group1 }}-mc${{ steps.release_versions.outputs.group2 }}-fabric"
changelog: ${{ steps.latest_release.outputs.body }}
loaders: |
fabric
quilt
game-versions: ${{ steps.release_versions.outputs.group2 }}
dependencies: yacl