switch to modern buildscript

This commit is contained in:
FalsePattern committed 2024-07-04 02:48:13 +02:00
1 parent 2acbb60547
commit 7d2344b63d
18 files changed
+461 -1791

No files matched your search

-27
View File
@@ -5,31 +5,6 @@ labels: ["bug"]
assignees:
- falsepattern
body:
# Optional, only for mods that do stuff with rendering/native code
- type: dropdown
id: os
attributes:
label: OS
description: What kind of operating system do you have?
options:
- Windows
- Linux/BSD
- MacOS
validations:
required: true
# Optional, only for graphics mods
- type: dropdown
id: gpu
attributes:
label: GPU
description: What kind of graphics card do you have? If you have multiple, select the one that minecraft uses, you can usually find it somewhere at the top of the crash report.
options:
- AMD
- NVIDIA
- Intel
validations:
required: true
# Recommended for precise context
- type: input
id: modpack
attributes:
@@ -37,7 +12,6 @@ body:
description: If you used the mod in a modpack, you should include the pack's exact name and version here to make debugging easier.
validations:
required: false
# Essential
- type: textarea
id: logs
attributes:
@@ -45,7 +19,6 @@ body:
description: Attach the fml-client-latest.log file here.
validations:
required: true
# Essential
- type: textarea
id: description
attributes:
+1 -19
View File
@@ -5,7 +5,6 @@ labels: ["compat-request"]
assignees:
- falsepattern
body:
# Essential
- type: input
id: modname
attributes:
@@ -13,7 +12,6 @@ body:
description: The name of the other mod
validations:
required: true
# Essential
- type: input
id: modurl
attributes:
@@ -21,7 +19,6 @@ body:
description: A link to the main site where the other mod is hosted. Preferrably the original website of a mod, but a modrinth/curseforge/whatever page is also acceptable. Do not post a raw download link, those requests will be ignored.
validations:
required: true
# Important
- type: dropdown
id: license
attributes:
@@ -47,7 +44,6 @@ body:
- All Rights Reserved
validations:
required: true
# Recommended
- type: textarea
id: logs
attributes:
@@ -55,24 +51,10 @@ body:
description: Attach the fml-client-latest.log file here.
validations:
required: true
# Recommended
- type: textarea
id: description
attributes:
label: Description
description: Describe any visual errors that appear, and attach screenshots of them. You can leave this empty if it's a crash without any visible stuff.
validations:
required: false
# Modify this after every added patch
# - type: checkboxes
# id: existingpatches
# attributes:
# label: Existing Patches
# description: The mods below already have compatibility patches. If you're experiencing issues with those, submit either a crash or a bug report!
# options:
# - label: This request is not for X
# required: true
# - label: This request is not for Y
# required: true
# - label: This request is not for Z
# required: true
required: false
-27
View File
@@ -1,27 +0,0 @@
if [[ -d "run/crash-reports" ]]; then
echo "Crash reports detected:"
cat $directory/*
exit 1
fi
if grep --quiet "Fatal errors were detected" server.log; then
echo "Fatal errors detected:"
cat server.log
exit 1
fi
if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" server.log; then
echo "Server force stopped:"
cat server.log
exit 1
fi
if grep --quiet 'Done .+ For help, type "help" or "?"' server.log; then
echo "Server didn't finish startup:"
cat server.log
exit 1
fi
echo "No crash reports detected"
exit 0
+9 -37
View File
@@ -1,45 +1,17 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build and test
on:
pull_request:
branches: [ master, main ]
branches:
- master
push:
branches: [ master, main ]
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup the workspace
run: ./gradlew setupCIWorkspace
- name: Build the mod
run: ./gradlew build
- name: Run server for 1.5 minutes
run: |
mkdir -p run
echo "eula=true" > run/eula.txt
timeout 90 ./gradlew runServer | tee --append server.log || true
- name: Test no errors reported during server run
run: |
chmod +x .github/scripts/test-no-error-reports.sh
.github/scripts/test-no-error-reports.sh
uses: FalsePattern/fpgradle-workflows/.github/workflows/build-and-test.yml@master
with:
timeout: 90
workspace: setupCIWorkspace
client-only: false
+13 -42
View File
@@ -1,50 +1,21 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Release tagged build
name: Release Tags
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
release-tags:
uses: FalsePattern/fpgradle-workflows/.github/workflows/release-tags.yml@master
with:
workspace: "setupCIWorkspace"
secrets:
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup the workspace
run: ./gradlew setupCIWorkspace
- name: Publish to Maven, Modrinth, and CurseForge
run: ./gradlew publish
env:
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
- name: Release under current tag
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
title: "${{ env.RELEASE_VERSION }}"
files: build/libs/*.jar