Skip to content

Commit

Permalink
1.17.x-1.20.x support
Browse files Browse the repository at this point in the history
  • Loading branch information
JoakimThorsen committed Dec 26, 2023
0 parents commit 3a78fe0
Show file tree
Hide file tree
Showing 47 changed files with 2,554 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Bug Report
description: Something doesn't seem correct and it might be a bug
labels: []
body:
- type: textarea
id: description
attributes:
label: Bug description
description: |
A clear and concise description of what the bug is.
Is it a game crash, an unexpected behavior, or has something gone wrong?
If applicable, add screenshots to help explain the bug.
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: to-reproduce
attributes:
label: Steps to reproduce
description: Steps to reproduce the bug
placeholder: |
1. Create a world
2. Wait until midnight
3. Hug a creeper
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: What did you expect to happen?
placeholder: The creeper explodes
- type: textarea
id: actual-behavior
attributes:
label: Actual behavior
description: What actually happened?
placeholder: The creeper launches itself into the sky
- type: textarea
id: logs
attributes:
label: Relevant logs
description: |-
If it's a crash, send the corresponding Minecraft log in the `logs` folder, or crash report in the `crash-reports` folder, here.
Please upload the log file as an attachment, or upload the log to [pastebin](https://pastebin.com/) / [mclo.gs](https://mclo.gs/) and paste the url here.
Please refrain from pasting the entire log file directly.
Leave empty if there is none.
placeholder: https://pastebin.com/J6b7lKxR
- type: input
id: minecraft-version
attributes:
label: Minecraft version
description: The Minecraft version(s) where this bug occurs in.
placeholder: 1.15.2
validations:
required: true
- type: input
id: mod-version
attributes:
label: TemplateMod version
description: The TemplateMod version(s) where this bug occurs in.
placeholder: 1.2.3
validations:
required: true
- type: textarea
id: other-information
attributes:
label: Other information
description: Other useful information to this bug report, e.g. other related mod version(s). Leave empty if there is none.
placeholder: The issue only occurs if the player is in survival mode
- type: checkboxes
id: check-list
attributes:
label: Check list
options:
- label: I have verified that the issue persists in the latest version of the mod.
required: true
- label: I have searched the existing issues and confirmed that this is not a duplicate.
required: true
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Feature Request
description: Suggest an idea for this project
labels: []
body:
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why do you want this feature? What problem do you want to solve? How can the suggested feature help with that?
placeholder: Tell us what you want!
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Describe the feature you want, as detailed as possible
placeholder: I want to see a fancy starry sky when I look up at midnight.
validations:
required: true
- type: textarea
id: other-information
attributes:
label: Other information
description: Other useful information to this feature request. Leave empty if there is none.
108 changes: 108 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: step.build

on:
workflow_call:
inputs:
release:
type: boolean
required: false
default: false
target_subproject:
description: see release.yml, leave it empty to build all
type: string
required: false
default: ''
# # [FEATURE] MIXIN_AUDITOR
# mixin_audit:
# description: run mixin audit for Minecraft server after build
# type: boolean
# required: false
# default: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17

- name: Cache gradle files
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
./.gradle/loom-cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '**/gradle.properties', '**/*.accesswidener', 'settings.json') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with gradle
run: |
chmod +x gradlew
if [ -z "${{ inputs.target_subproject }}" ]; then
echo "Building all subprojects"
./gradlew build
else
args=$(echo "${{ inputs.target_subproject }}" | tr ',' '\n' | sed 's/$/:build/' | paste -sd ' ')
echo "Building with arguments=$args"
./gradlew $args
fi
env:
BUILD_ID: ${{ github.run_number }}
BUILD_RELEASE: ${{ inputs.release }}

# # [FEATURE] MIXIN_AUDITOR
# - name: Run mixin audit check for Minecraft server
# if: ${{ inputs.mixin_audit }}
# timeout-minutes: 10
# run: |
# mkdir -p ./run
# echo eula=true > ./run/eula.txt
# ./gradlew runServerMixinAudit

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: versions/*/build/libs/

# # [FEATURE] FALLENS_MAVEN
# - name: Publish with gradle
# if: inputs.release || github.ref == 'refs/heads/dev'
# run: |
# if [ -z "${{ inputs.target_subproject }}" ]; then
# echo "Publishing all subprojects"
# ./gradlew publish
# else
# args=$(echo "${{ inputs.target_subproject }}" | tr ',' '\n' | sed 's/$/:publish/' | paste -sd ' ')
# echo "Publishing with arguments=$args"
# ./gradlew $args
# fi
# env:
# BUILD_RELEASE: ${{ inputs.release }}
# FALLENS_MAVEN_TOKEN: ${{ secrets.FALLENS_MAVEN_TOKEN }}

summary:
runs-on: ubuntu-22.04
needs:
- build

steps:
- uses: actions/checkout@v3

- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: build-artifacts

- name: Make build summary
run: python3 .github/workflows/scripts/summary.py # ubuntu-22.04 uses Python 3.10.6
env:
TARGET_SUBPROJECT: ${{ inputs.target_subproject }}
20 changes: 20 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Dev Builds

on:
push:
paths:
- "*.gradle"
- "gradle.properties"
- "src/**"
- "versions/**"
- ".github/**"
pull_request:


jobs:
build:
uses: ./.github/workflows/build.yml
secrets: inherit
# # [FEATURE] MIXIN_AUDITOR
# with:
# mixin_audit: true
29 changes: 29 additions & 0 deletions .github/workflows/matrix_prep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: step.matrix_prepare

on:
workflow_call:
inputs:
target_subproject:
description: see release.yml, for generating matrix entries
type: string
required: false
default: ''
outputs:
matrix:
description: The generated run matrix
value: ${{ jobs.matrix_prep.outputs.matrix }}


jobs:
matrix_prep:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- id: setmatrix
run: python3 .github/workflows/scripts/matrix.py # ubuntu-22.04 uses Python 3.10.6
env:
TARGET_SUBPROJECT: ${{ inputs.target_subproject }}

outputs:
matrix: ${{ steps.setmatrix.outputs.matrix }}
Loading

0 comments on commit 3a78fe0

Please sign in to comment.