Skip to content

1.21.1

1.21.1 #44

Workflow file for this run

name: Publish
on:
pull_request:
types:
- closed
branches:
- master
workflow_dispatch:
env:
MINECRAFT_VERSION: 1.21.1
JAVA_VERSION: 21
VERSION: 5.2.2+1.21.1
VERSION_TYPE: beta
permissions:
contents: write
jobs:
build:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' # @AnthonyWC on GH, https://github.com/orgs/community/discussions/26724#discussioncomment-3253096
runs-on: ubuntu-latest
steps:
- name: Check Environment Variables
run: env
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Java
uses: actions/setup-java@v3.12.0
with:
distribution: "temurin"
java-version: ${{ env.JAVA_VERSION }}
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Datagen
run: ./gradlew runDatagen
- name: Copy Datagen
run: mkdir -p src/main/generated/data/mystical/ && cp -r src/main/generated/assets/mystical/lang src/main/generated/data/mystical/
- name: Upload Generated Data
uses: actions/upload-artifact@v4
with:
name: GeneratedData
path: src/main/generated/
overwrite: true
- name: Build
run: ./gradlew build
- name: Upload JAR Artifacts
uses: actions/upload-artifact@v4
with:
name: JARs
path: build/libs/*
- name: Game Test
run: mkdir build/gametest && echo "eula=true" >> build/gametest/eula.txt && ./gradlew runGameTest # ty modmuss
- name: Publish
uses: Kir-Antipov/mc-publish@v3.3
with:
version-type: ${{ env.VERSION_TYPE }}
modrinth-id: ibmeD85j
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
github-tag: "v${{ env.VERSION }}"
github-token: ${{ secrets.GH_TOKEN }}
changelog-file: CHANGELOG.md
game-versions: "${{ env.MINECRAFT_VERSION }}"
java: "${{ env.JAVA_VERSION }}"