Skip to content

Publish NeoForge Build #4

Publish NeoForge Build

Publish NeoForge Build #4

name: Publish NeoForge Build
on: workflow_dispatch
jobs:
public-neoforge:
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 neoforge: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 NeoForge artifact
uses: shogo82148/[email protected]
with:
upload_url: ${{ steps.latest_release.outputs.upload_url }}
asset_path: neoforge/build/libs/craftgr-*-mc*-neoforge.jar
- name: Publish NeoForge artifact
uses: Kir-Antipov/[email protected]
with:
files: neoforge/build/libs/craftgr-*-mc*-neoforge.jar
modrinth-id: lKYr4L6w
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 1009348
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
name: "[NeoForge] 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 }}-neoforge"
changelog: ${{ steps.latest_release.outputs.body }}
loaders: |
neoforge
game-versions: ${{ steps.release_versions.outputs.group2 }}
dependencies: yacl