Skip to content

Publish Fabric Build #7

Publish Fabric Build

Publish Fabric Build #7

name: Publish Fabric Build
on: workflow_dispatch
jobs:
publish-fabric:
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 }}
curseforge-id: 1009348
curseforge-token: ${{ secrets.CURSEFORGE_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