Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .github/ISSUE_TEMPLATE/000-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,40 @@ body:
id: gtceu-version
attributes:
label: GregTech CEu Version
description: The version of Gregtech CEu you were using when this bug was encountered. If you do not know where to find this, look for the mod jar file in the mods folder, or in the mods viewer in-game.
description: The version of GregTech CEu you were using when this bug was encountered. If you do not know where to find this, look for the mod jar file in the mods folder, or in the mods viewer in-game.
placeholder: "Example: v2.3.4"
validations:
required: true
- type: input
- type: dropdown
id: mc-version
attributes:
label: Minecraft Version
description: The version of Minecraft you were using when this bug was encountered. If you do not know where to find this, in the main menu at the bottom left.
placeholder: "Example: 1.20.1"
description: The version of Minecraft you were using when this bug was encountered. If you do not know where to find this, it is in the bottom left of the main menu. Any version not listed is not supported.
options:
- "1.20.1 Forge"
- "1.21.1 NeoForge"
validations:
required: true
- type: dropdown
id: recipe-viewer
attributes:
label: Recipe Viewer Installed
description: The recipe viewer installed. If you were not using addons, please leave this field blank.
description: The recipe viewer installed.
options:
- "JEI"
- "REI"
- "EMI"
- "No Recipe Viewer"
validations:
required: false
- type: input
- type: dropdown
id: environment
attributes:
label: Environment
description: "How you were playing on the world. Typical answers include: Singleplayer, Open to LAN, Dedicated Server."
placeholder: "Example: Singleplayer"
description: How you were playing on the world. Hybrid servers are unsupported.
options:
- "Singleplayer"
- "Multiplayer - Open to LAN"
- "Multiplayer - Dedicated Server"
validations:
required: true
- type: dropdown
Expand All @@ -69,8 +73,8 @@ body:
id: other-mods
attributes:
label: Other Installed Mods
description: List all mods you have installed here, or the name of the modpack you're playing.
placeholder: "Example: ATM9, Embeddium, NuclearCraft Neoteric, AE2..."
description: Enter the name of the modpack you're playing, or list all mods you have installed here.
placeholder: "Example: Cosmic Frontiers, Monifactory, Embeddium, NuclearCraft Neoteric, AE2,..."
validations:
required: true
- type: textarea
Expand Down
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/001-feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ body:
label: Cross-mod Integration
description: "Does this feature involve integration with another mod? If so specify the mod(s). Otherwise, leave this blank."
placeholder: "Example: Create Mod"
- type: dropdown
id: mc-version
attributes:
label: Minecraft Version
description: The version of Minecraft you wish this feature was added for.
options:
- "Both"
- "1.20.1 Forge"
- "1.21.1 NeoForge"
- type: textarea
id: description
attributes:
Expand Down
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: GregTech CEu Discord
url: https://discord.gg/bWSWuYvURP
about: Join us on Discord to discuss questions, bugs, and more.
17 changes: 3 additions & 14 deletions .github/actions/build_setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,9 @@ runs:
distribution: temurin
java-version: ${{ contains(env.REF, '1.20.1') && '17' || '21' }}

- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Grant execute permission for gradlew
shell: bash
run: chmod +x gradlew

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
cache-write-only: ${{ inputs.update-cache }}
generate-job-summary: false
gradle-home-cache-includes: |
caches
notifications
jdks
wrapper
cache-read-only: ${{ github.ref != 'refs/heads/1.20.1' && github.ref != 'refs/heads/1.21' }}
add-job-summary: 'on-failure'
34 changes: 34 additions & 0 deletions .github/json/config-latest-1.21.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"categories": [
{
"title": "### Added",
"labels": ["type: feature"]
},
{
"title": "### Fixed",
"labels": ["type: bugfix"]
},
{
"title": "### Changed",
"labels": ["type: refactor", "type: translation"]
}
],
"sort": "ASC",
"template": "## What's Changed since #{{FROM_TAG}}\n#{{CHANGELOG}}\n#{{UNCATEGORIZED}}\n#{{CHANGES}} lines changed - see the [full diff here](#{{RELEASE_DIFF}})",
"pr_template": "- #{{TITLE}} by @#{{AUTHOR}} in [##{{NUMBER}}](#{{URL}})",
"empty_template": "",
"ignore_labels": ["ignore changelog"],
"tag_resolver": {
"method": "semver",
"filter": {
"pattern": "^(?!v?[0-9\\.]+(-1\\.21)$).+$",
"flags": "gu"
},
"transformer": {
"pattern": "v?([0-9\\.]+)(-[0-9\\.]+)?",
"target": "$1"
}
},
"max_pull_requests": 1000,
"max_back_track_time_days": 60
}
15 changes: 13 additions & 2 deletions .github/json/config-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,21 @@
}
],
"sort": "ASC",
"template": "## What's Changed\n#{{CHANGELOG}}\n#{{UNCATEGORIZED}}",
"template": "## What's Changed since #{{FROM_TAG}}\n#{{CHANGELOG}}\n#{{UNCATEGORIZED}}\n#{{CHANGES}} lines changed - see the [full diff here](#{{RELEASE_DIFF}})",
"pr_template": "- #{{TITLE}} by @#{{AUTHOR}} in [##{{NUMBER}}](#{{URL}})",
"empty_template": "",
"ignore_labels": ["ignore changelog"],
"tag_resolver": {
"method": "semver",
"filter": {
"pattern": "^(?!v?[0-9\\.]+(-1\\.20\\.1)?$).+$",
"flags": "gu"
},
"transformer": {
"pattern": "v?([0-9\\.]+)(-[0-9\\.]+)?",
"target": "$1"
}
},
"max_pull_requests": 1000,
"max_back_track_time_days": 30
"max_back_track_time_days": 60
}
5 changes: 5 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://github.com/github/issue-labeler#usage
1.20.1:
- '^1\.20\.1 Forge$'
1.21:
- '^1\.21\.1 NeoForge$'
27 changes: 19 additions & 8 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Latest Build
on:
push:
branches: ['1.20.1', '1.21']
paths-ignore: ['.github/**', '**/*.md']
paths: ['src/**', '**/*.gradle', 'gradle.properties']

concurrency:
group: auto-build-${{ github.ref }}
Expand All @@ -13,25 +13,35 @@ jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
PUBLISH: ${{ !contains(github.event.commits[0].message, '[no-snapshot]') }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
SNAPSHOT: true
GITHUB_TOKEN: ${{ github.token }}
CI: true
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Build
uses: ./.github/actions/build_setup
- name: Get Version
- name: Get Mod Version
id: ver
run: echo "version=$(./gradlew -q printVersion)" >> $GITHUB_OUTPUT
- name: Version Suffix
id: suffix
run: echo "VERSION_SUFFIX=$(echo "${{ github.sha }}" | cut -c 1-7)" >> $GITHUB_ENV
- run: git fetch origin 1.20.1
- name: Build
run: ./gradlew build --build-cache
- name: Publish to Maven
if: github.repository_owner == 'GregTechCEu'
if: ${{ github.repository_owner == 'GregTechCEu' && env.PUBLISH == 'true' }}
run: ./gradlew publish --build-cache
- name: Rename Jars
if: ${{ env.PUBLISH == 'true' }}
run: for file in build/libs/*; do mv "$file" "${file/SHOT/SHOT+$(date --utc '+%Y%m%d-%H%M%S')-${{ env.VERSION_SUFFIX }}}"; done;
- name: Upload Artifacts
if: ${{ env.PUBLISH == 'true' }}
uses: actions/upload-artifact@v4
with:
name: build-artifacts
Expand All @@ -40,21 +50,22 @@ jobs:
retention-days: 90
- name: Changelog
id: changelog
if: ${{ env.PUBLISH == 'true' }}
uses: mikepenz/release-changelog-builder-action@v5
with:
configuration: ./.github/json/config-latest.json
fromTag: latest-${{ github.ref_name }}
configuration: "./.github/json/config-latest${{ contains(github.ref_name, '1.21') && '-1.21' || '' }}.json"
toTag: ${{ github.ref }}
fetchViaCommits: true
failOnError: false
- name: Release Latest
if: ${{ env.PUBLISH == 'true' }}
uses: andelf/nightly-release@46e2d5f80828ecc5c2c3c819eb31186a7cf2156c
with:
tag_name: latest-${{ github.ref_name }}
name: '${{ github.ref_name }}-${{ steps.ver.outputs.version}} SNAPSHOT $$'
name: '${{ github.ref_name }}-${{ steps.ver.outputs.version}} SNAPSHOT ${{ env.VERSION_SUFFIX }}'
prerelease: true
body: |
The latest build of GTM for Minecraft ${{ github.ref_name }}.
Please report any [issues](https://github.com/GregTechCEu/GregTech-Modern/issues).
${{ steps.changelog.outputs.changelog }}
files: build/libs/*.jar
files: build/libs/*.jar
16 changes: 14 additions & 2 deletions .github/workflows/build-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
env:
VERSION_SUFFIX: "PR-${{ github.event.number }}"
steps:
- uses: actions/checkout@v4
- name: Check Path Filter
Expand All @@ -31,10 +33,20 @@ jobs:
- name: Build
if: steps.filter.outputs.code == 'true'
run: ./gradlew assemble --build-cache
- name: Upload Artifact
- name: Rename Jars
if: steps.filter.outputs.code == 'true'
run: for file in build/libs/*; do mv "$file" "${file/.jar/-${{ env.VERSION_SUFFIX }}.jar}"; done;
- name: Upload All Artifacts
if: steps.filter.outputs.code == 'true'
uses: actions/upload-artifact@v4.0.0
with:
name: build output
name: Full Package
path: build/libs/*
retention-days: 15
- name: Upload Main Jar
if: steps.filter.outputs.code == 'true'
uses: actions/upload-artifact@v4.0.0
with:
name: Main Jar
path: build/libs/*[0-9]-PR-*.jar
retention-days: 15
56 changes: 56 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish docs via GitHub Pages
on:
workflow_dispatch:
push:
branches: [1.20.1]
paths: ['docs/**']

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
build:
name: build docs
runs-on: ubuntu-latest
defaults:
run:
working-directory: './docs'
steps:
- uses: actions/checkout@v4
with:
ref: '1.20.1'
sparse-checkout: './docs'
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- run: pip install -r ./requirements.txt
- uses: actions/cache@v4
with:
key: 'mkdocs-cache'
path: './docs/.cache'
- name: Build static files
id: mkdocs
run: mkdocs build
- name: Upload pages as artifact
id: artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/site/'

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .github/workflows/format-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
code:
- 'src/main/java/**'
- 'src/test/**'
- run: git fetch origin 1.20.1
if: steps.filter.outputs.code == 'true'
- name: Setup Build
if: steps.filter.outputs.code == 'true'
uses: ./.github/actions/build_setup
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/manage-issue-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Manages labels on new issues
name: Issue Labels

on:
issues:
types: [opened, edited]

permissions:
issues: write
contents: read

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.3
with:
configuration-path: .github/labeler.yml
enable-versioned-regex: false
9 changes: 3 additions & 6 deletions .github/workflows/manage-pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ name: Pull Request Labels

# Checks for label once PR has been reviewed or label is applied
on:
pull_request_review:
types: [submitted]
pull_request:
types: [labeled]
types: [opened, labeled, unlabeled]

concurrency:
group: pr-labels-${{ github.head_ref }}
cancel-in-progress: true

jobs:
Labels:
name: On Approval
if: github.event.review.state == 'approved'
labels:
name: Label Check
runs-on: ubuntu-latest
permissions:
pull-requests: read # needed to utilize required-labels
Expand Down
Loading