Skip to content

Commit

Permalink
Merge branch 'CleanroomMC:main' into ench-attacktargetevent
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecdcaeb authored Oct 26, 2024
2 parents 451db5b + b958531 commit 0283639
Show file tree
Hide file tree
Showing 78 changed files with 2,707 additions and 1,272 deletions.
56 changes: 56 additions & 0 deletions .github/DISCUSSION_TEMPLATE/draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
title: Proposal Name
body:
- type: input
id: summary
attributes:
label: Summary
placeholder: Present your proposal with a sentence or two...
validations:
required: true
- type: textarea
id: goal
attributes:
label: Goals
placeholder: What are the goals for this proposal?
validations:
required: true
- type: textarea
id: non-goals
attributes:
label: Non Goals
placeholder: What are not the goals for this proposal? This can help eliminating feature creeping.
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
placeholder: What made you want to propose this idea?
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
placeholder: Write everything down to the tiniest detail!
validations:
required: true
- type: textarea
id: dependencies
attributes:
label: Dependencies
placeholder: Does this proposal depend on any prior proposals and/or any external projects?
- type: textarea
id: references
attributes:
label: References
placeholder: Note down anything you referenced, whether that be links, papers etc.
- type: checkboxes
id: acknowledge
attributes:
label: Guidelines
description: |
View the guidelines here: [Cleanroom Feature Proposal Guidelines](../blob/main/CFP_GUIDELINES.md)
options:
- label: I have and will continue to adhere to the guidelines
required: true
91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/000-report-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: 🐛 Report Bug
description: "Did something not work as expected?"
body:
- type: markdown
attributes:
value: "A bug/crash report with sufficient information and logs to reproduce and track down."
- type: input
id: discord
attributes:
label: Your CleanroomMC Discord Username
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
placeholder: "Example: Fake#1234"
- type: input
id: version
attributes:
label: Cleanroom Version
description: "What version of the Cleanroom are you using?"
placeholder: "Example: 15.24.0.3000"
validations:
required: true
- type: dropdown
id: java
attributes:
label: Java Version
description: What Java version are you using? It's worth mentioning that if you play on Java9+ you should try update to latest minor release (e.g. prefer Java 17.0.6 over 17.0.2) of that version.
options:
- Java 8
- Java 9
- Java 11
- Java 17
- Java 19
- Java 20
- Java 21
- Java 22
- Other (Please Specify)
validations:
required: true
- type: dropdown
id: graphics
attributes:
label: Graphics Card Vendor
description: What graphics card vendor are you using?
options:
- Other (Please Specify)
- NVidia
- AMD/ATI
- Intel iGPU
- AMD iGPU
- Mesa/Software
validations:
required: true
- type: textarea
id: report
attributes:
label: Bug Report
description: "Relevant information, as well as relevant logs attached such as `logs/latest.log` and `logs/debug.log`."
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
validations:
required: true
- type: textarea
id: modlist
attributes:
label: Mod List
description: "List of mods, ideally a minimal reproducible set (can be retrieved from latest.log)."
placeholder: "List of mods goes here"
validations:
required: true
- type: textarea
id: notes
attributes:
label: MMC Instance Notes
description: "Obtain from Notes sections if using MMC instance pack."
placeholder: "Notes goes here"
validations:
required: true
- type: checkboxes
id: final
attributes:
label: Final Checklist
description: Certify that you read things
options:
- label: "I have searched the issues and haven't found a similar issue."
required: true
- label: "I have read the known incompatibilities and this is not related to one of those."
required: true
- label: "I have installed [Fugue](https://github.com/CleanroomMC/Fugue) and it does not fix this issue."
required: true
- label: "I am using experimental branch and have installed [Scalar](https://github.com/CleanroomMC/Scalar/releases/tag/2.11.1) and it does not fix this issue."
required: true
- label: "I am running a test build from Cleanroom Github Actions. (Or, if I've compiled it myself I plan to fix the issue)"
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/CleanroomMC/Cleanroom/discussions/new?category=draft
about: Please draft a proposal feature here.
61 changes: 51 additions & 10 deletions .github/workflows/BuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ on:
push:
pull_request:
workflow_dispatch:
inputs:
build_type:
type: choice
description: Build type
options:
- Stable
- Experimental

run-name: "${{ github.event_name == 'pull_request' && 'Pull Request Build, DO NOT DOWNLOAD' || format('{0}#{1}: {2}', github.ref_name, github.run_number, github.event.commits[0].message)}}"

permissions:
contents: read
Expand All @@ -21,33 +30,65 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
fetch-tags: true
fetch-depth: 0

- name: Set up JDK 21
uses: actions/setup-java@v3.10.0
uses: actions/setup-java@v4.2.1
with:
java-version: '21'
distribution: 'temurin'

- name: Get branch names.
id: branch-names
uses: tj-actions/branch-names@v8

# add more feat here if required
- name: Gather build info
id: vars
run: |
BRANCH_FEAT=$(echo "${{ steps.branch-names.outputs.current_branch }}" | cut -d'/' -f1 | awk '{print tolower($0)}')
if [ "$BRANCH_FEAT" = "experimental" ]; then
echo "BUILD_TYPE=Experimental" >> $GITHUB_OUTPUT
else
echo "BUILD_TYPE=Stable" >> $GITHUB_OUTPUT
fi
- name: Fix Gradle permission
run: chmod +x ./gradlew

- name: Setup Forge env
run: ./gradlew setup
run: ./gradlew setup -Prun_number=${{ github.run_number }}
- name: Stop Gradle daemon
run: ./gradlew --stop

- name: Build Forge Installer Jar
run: ./gradlew installerJar
- name: Build Jars
run: ./gradlew installerJar -Prun_number=${{ github.run_number }}

- name: Get version
run: echo "CLEANROOM_VERSION=$(cat version.txt)" >> $GITHUB_ENV

- name: Upload Forge Universal
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4.3.3
with:
name: universal
name: universal-${{ env.CLEANROOM_VERSION }}
path: projects/cleanroom/build/libs/*-universal.jar

- name: Upload Forge Installer
uses: actions/[email protected]
id: upload-job
uses: actions/[email protected]
with:
name: installer-${{ env.CLEANROOM_VERSION }}
path: projects/cleanroom/build/libs/*-installer.jar
if-no-files-found: error

- name: Repository Dispatch
if: ${{ success() && github.event_name != 'pull_request' }}
uses: peter-evans/repository-dispatch@v3
with:
name: installer
path: projects/cleanroom/build/libs/*-installer.jar
token: ${{ secrets.CLEANROOMMC_DISPATCH_TOKEN }} # require PAT :shrug:
repository: CleanroomMC/CleanroomMMC
event-type: cleanroom_upload_artifact
client-payload: '{"commit_hash": "${{ github.sha }}", "run_job_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "branch": "${{ steps.branch-names.outputs.current_branch }}", "build_type": "${{ inputs.environment || steps.vars.outputs.BUILD_TYPE }}", "actor": "${{ github.actor }}", "version": "${{ env.CLEANROOM_VERSION }}"}'
2 changes: 1 addition & 1 deletion .github/workflows/EventHandler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

name: Event Handler
on:
push:
workflow_dispatch:

permissions:
contents: read
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Auto Releases

on:
push:
tags:
- '*'

jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/[email protected]
with:
fetch-tags: true
fetch-depth: 0

- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: '21'
distribution: 'temurin'

- name: Fix Gradle permission
run: chmod +x ./gradlew

- name: Setup Forge env
run: ./gradlew setup -Prun_number=${{ github.run_number }} -Prelease=true

- name: Get version
run: echo "CLEANROOM_VERSION=$(cat version.txt)" >> $GITHUB_ENV

- name: Stop Gradle daemon
run: ./gradlew --stop

- name: Build Jars
run: ./gradlew installerJar -Prun_number=${{ github.run_number }} -Prelease=true

- name: Stop Gradle daemon again
run: ./gradlew --stop

- name: Publish to maven for mod development
run: ./gradlew publish -PoutlandUsername=${{ secrets.MAVEN_USERNAME }} -PoutlandPassword="${{ secrets.MAVEN_PASSWORD }}" -Prun_number=${{ github.run_number }} -Prelease=true

- name: Checkout CleanroomMMC
uses: actions/[email protected]
with:
repository: CleanroomMC/CleanroomMMC
path: mmc

- name: setup python
uses: actions/[email protected]
with:
python-version: '3.12'

- name: Install script dependencies
run: |
python -m pip install --upgrade pip
pip install -r mmc/requirements.txt
- name: Generate MMC Pack
run: python main.py
working-directory: ./mmc
env:
PATH_TO_EXIST_INSTALLER: ../projects/cleanroom/build/libs/cleanroom-${{ env.CLEANROOM_VERSION }}-installer.jar

- name: Copy MMC Pack
run: cp mmc/build/CleanroomMMC.zip ./projects/cleanroom/build/libs/Cleanroom-MMC-instance-${{ env.CLEANROOM_VERSION }}.zip

- uses: ncipollo/[email protected]
with:
artifacts: "projects/cleanroom/build/libs/*"
generateReleaseNotes: true
12 changes: 5 additions & 7 deletions .github/workflows/WindowsTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
name: Test setup under Windows

on:
push:
pull_request:
workflow_dispatch:

permissions:
Expand All @@ -21,18 +19,18 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- name: Set up JDK 21
uses: actions/setup-java@v3.10.0
uses: actions/setup-java@v4.2.1
with:
java-version: '21'
distribution: 'temurin'
distribution: 'semeru'

- name: Setup Forge env
run: ./gradlew.bat setup
- name: Stop Gradle daemon
run: ./gradlew.bat --stop

- name: Build Forge Installer Jar
run: ./gradlew.bat installerJar
- name: Build Jar
run: ./gradlew.bat build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/buildSrc/.gradle/
/buildSrc/build/
/logs/
version.txt
src/main/java/com/cleanroommc/common/CleanroomVersion.java
8 changes: 8 additions & 0 deletions CFP_GUIDELINES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Cleanroom Feature Proposal Guidelines

1. Be as descriptive as possible!
2. Keep the content sensible.
3. Keep the profanities to a minimal level.
4. Don't spam proposals that are still in draft stage, the triage will take a look at it in due time!
5. Or, just don't spam at all!
6. Feel free to ping a triage member whenever the proposal has moved to a new stage, but only once!
Loading

0 comments on commit 0283639

Please sign in to comment.