Skip to content
Merged
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
88 changes: 71 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,78 @@
name: CI
name: OreSpawn 1.10 CI

on: [push, pull_request]
#on:
# push:
# branches: [ master-1.12 ]
# pull_request:
# # The branches below must be a subset of the branches above
# branches: [ master-1.12 ]
# types: [opened, synchronize, reopened]
on:
push:
branches:
- master-1.10.2
- 'feature/**'
pull_request:
branches:
- master-1.10.2

permissions:
contents: read

concurrency:
group: orespawn-1.10-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build, test, and audit
runs-on: ubuntu-latest
name: Build
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install Java 8 toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install Java 17 for Gradle
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: microsoft
java-version: '17'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6

- name: Make the wrapper executable
run: chmod +x ./gradlew

- name: Build, test, and audit release artifacts
run: >-
./gradlew clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums
verifyEclipseProductionClasspath --no-daemon --stacktrace

- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: OreSpawn-1.10.2-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/OreSpawn-4.0.8.110021.jar
build/libs/OreSpawn-4.0.8.110021-sources.jar
build/libs/OreSpawn-4.0.8.110021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt

- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
java-version: 8
- run: chmod a+x gradlew
- run: ./gradlew --version --no-daemon
- run: ./gradlew setupCIWorkspace -S
- run: ./gradlew clean build -S
name: OreSpawn-1.10.2-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
build/test-results/**
build/reports/**
build/*-run/logs/**
build/legacy-abi/**/run/logs/**
build/*-integration-run/**/*.properties
build/problems/**
116 changes: 49 additions & 67 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,55 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on: [push, pull_request]
#on:
# push:
# branches: [ master-1.12 ]
# pull_request:
# # The branches below must be a subset of the branches above
# branches: [ master-1.12 ]
# types: [opened, synchronize, reopened]
# schedule:
# - cron: '43 7 * * 4'
name: CodeQL

on:
push:
branches:
- master-1.10.2
- 'feature/**'
pull_request:
branches:
- master-1.10.2
schedule:
- cron: '43 7 * * 4'

permissions:
actions: read
contents: read
security-events: write

jobs:
analyze:
name: Analyze
name: Analyze Java
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
timeout-minutes: 45

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install Java 8 toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install Java 17 for Gradle
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: microsoft
java-version: '17'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6

- name: Initialize CodeQL
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
with:
languages: java-kotlin

- name: Compile production code
run: |
chmod +x ./gradlew
./gradlew clean classes --no-daemon --stacktrace

- name: Analyze
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
89 changes: 89 additions & 0 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Start OreSpawn release from tag

on:
push:
tags:
- '*.*.*.*'

permissions:
actions: write
contents: read

concurrency:
group: orespawn-release-starter-${{ github.ref_name }}
cancel-in-progress: false

jobs:
dispatch-release:
name: Validate tag and start guarded release
if: github.repository == 'MinecraftModDevelopmentMods/OreSpawn'
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out tagged source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0

- name: Validate release tag, target metadata, and prior CI
id: validate
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail

value() { sed -n "s/^$1=//p" gradle.properties; }
release_version="$(value mod_version)"
minecraft_version="$(value minecraft_version)"
loader_name="$(value loader_name)"
loader_code="$(value loader_code)"

IFS=. read -r mc_major mc_minor mc_patch extra <<<"$minecraft_version"
if [[ -n "${extra:-}" || -z "${mc_major:-}" || -z "${mc_minor:-}" ]]; then
echo "Invalid minecraft_version=$minecraft_version" >&2
exit 1
fi
mc_patch="${mc_patch:-0}"
if [[ ! "$mc_major" =~ ^[0-9]+$ || ! "$mc_minor" =~ ^[0-9]+$ || ! "$mc_patch" =~ ^[0-9]+$ ]]; then
echo "Invalid minecraft_version=$minecraft_version" >&2
exit 1
fi
case "$loader_name:$loader_code" in
forge:1|neoforge:2) ;;
*) echo "Invalid loader metadata $loader_name/$loader_code" >&2; exit 1 ;;
esac
printf -v minor_padded '%02d' "$((10#$mc_minor))"
printf -v patch_padded '%02d' "$((10#$mc_patch))"
target_suffix="${mc_major}${minor_padded}${patch_padded}${loader_code}"

if [[ ! "$release_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.${target_suffix}$ ]]; then
echo "mod_version $release_version does not match $minecraft_version $loader_name target $target_suffix" >&2
exit 1
fi
if [[ "$GITHUB_REF_NAME" != "$release_version" ]]; then
echo "Release tag must equal mod_version $release_version; found $GITHUB_REF_NAME" >&2
exit 1
fi

successful_ci="$(gh api \
"repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?per_page=100" \
--jq '[.check_runs[] | select(.name == "Build, test, and audit" and .conclusion == "success")] | length')"
if [[ "$successful_ci" -lt 1 ]]; then
echo "The tagged commit has no successful Build, test, and audit check" >&2
exit 1
fi
echo "version=$release_version" >> "$GITHUB_OUTPUT"

- name: Start default-branch release workflow
env:
GH_TOKEN: ${{ github.token }}
RELEASE_VERSION: ${{ steps.validate.outputs.version }}
run: |
gh workflow run deploy-release.yml \
--repo "$GITHUB_REPOSITORY" \
--ref master-1.12 \
-f mode=publish \
-f release_ref="$GITHUB_REF_NAME" \
-f curseforge_channel=release \
-f confirm_version="$RELEASE_VERSION"
30 changes: 0 additions & 30 deletions .github/workflows/sonarqube.yml

This file was deleted.

20 changes: 16 additions & 4 deletions .github/workflows/validate-gradle-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
name: Validate Gradle Wrapper

on: [push, pull_request]
on:
push:
branches:
- master-1.10.2
- 'feature/**'
pull_request:
branches:
- master-1.10.2

permissions:
contents: read

jobs:
validation:
name: "Validation"
name: Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Validate wrapper integrity
uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
8 changes: 8 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Version 4.0.8.110021

* Preserve all eight ore/fluid host, tag, and biome editor fields when saved values exceed Minecraft 1.10.2's default 32-character text limit.
* Prevent opening and saving an unchanged editor profile from silently replacing long identifiers or comma-separated lists with truncated values.
* Add reproducible ForgeGradle 7 builds and guarded Maven, CurseForge, and GitHub release automation.
* Keep API major 1, provider/global/world schemas 4/6/5, registry and profile compatibility, migrations, and world-generation semantics unchanged.

Version 4.0.6.110021

* Adopt target-qualified four-component versions so Minecraft and loader compatibility can be identified from the mod version.
Expand Down Expand Up @@ -32,6 +39,7 @@ Version 4.0.6.110021
* Preserve vanilla springs in provider rocks through Forge's native terrain hooks.
* Restore reliable 1.10.2 editor backgrounds, tooltip clearing, translated cycle-button captions,
and safe OreSpawn world-settings navigation.
* Preserve long host-block, host-tag and biome-filter values when reopening the ore and fluid editors.
* Package translations under Minecraft 1.10's required `ll_CC.lang` filename casing so editor
captions load instead of displaying raw language keys.
* Existing chunks are not rewritten; the correction applies while generating new chunks.
Expand Down
Loading
Loading