Skip to content

Commit 328bf58

Browse files
authored
Merge pull request #244 from SkyBlade1978/feature/1.10.2-4.0.8-ci-cd
Release OreSpawn 4.0.8 for Forge 1.10.2
2 parents 583b8f7 + ded7c35 commit 328bf58

31 files changed

Lines changed: 1398 additions & 446 deletions

.github/workflows/ci.yml

Lines changed: 71 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,78 @@
1-
name: CI
1+
name: OreSpawn 1.10 CI
22

3-
on: [push, pull_request]
4-
#on:
5-
# push:
6-
# branches: [ master-1.12 ]
7-
# pull_request:
8-
# # The branches below must be a subset of the branches above
9-
# branches: [ master-1.12 ]
10-
# types: [opened, synchronize, reopened]
3+
on:
4+
push:
5+
branches:
6+
- master-1.10.2
7+
- 'feature/**'
8+
pull_request:
9+
branches:
10+
- master-1.10.2
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: orespawn-1.10-${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
1118

1219
jobs:
1320
build:
21+
name: Build, test, and audit
1422
runs-on: ubuntu-latest
15-
name: Build
23+
timeout-minutes: 60
24+
1625
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-java@v1
26+
- name: Check out source
27+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
28+
29+
- name: Install Java 8 toolchain
30+
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
31+
with:
32+
distribution: temurin
33+
java-version: '8.0.502+7'
34+
35+
- name: Install Java 17 for Gradle
36+
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
37+
with:
38+
distribution: microsoft
39+
java-version: '17'
40+
41+
- name: Set up Gradle
42+
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
43+
44+
- name: Make the wrapper executable
45+
run: chmod +x ./gradlew
46+
47+
- name: Build, test, and audit release artifacts
48+
run: >-
49+
./gradlew clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums
50+
verifyEclipseProductionClasspath --no-daemon --stacktrace
51+
52+
- name: Upload audited release candidate
53+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
54+
with:
55+
name: OreSpawn-1.10.2-${{ github.sha }}
56+
if-no-files-found: error
57+
retention-days: 30
58+
path: |
59+
build/libs/OreSpawn-4.0.8.110021.jar
60+
build/libs/OreSpawn-4.0.8.110021-sources.jar
61+
build/libs/OreSpawn-4.0.8.110021-javadoc.jar
62+
build/release/SHA256SUMS
63+
CHANGELOG.txt
64+
65+
- name: Upload diagnostics on failure
66+
if: failure()
67+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
1968
with:
20-
java-version: 8
21-
- run: chmod a+x gradlew
22-
- run: ./gradlew --version --no-daemon
23-
- run: ./gradlew setupCIWorkspace -S
24-
- run: ./gradlew clean build -S
69+
name: OreSpawn-1.10.2-diagnostics-${{ github.sha }}
70+
if-no-files-found: ignore
71+
retention-days: 14
72+
path: |
73+
build/test-results/**
74+
build/reports/**
75+
build/*-run/logs/**
76+
build/legacy-abi/**/run/logs/**
77+
build/*-integration-run/**/*.properties
78+
build/problems/**
Lines changed: 49 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,55 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
12-
name: "CodeQL"
13-
14-
on: [push, pull_request]
15-
#on:
16-
# push:
17-
# branches: [ master-1.12 ]
18-
# pull_request:
19-
# # The branches below must be a subset of the branches above
20-
# branches: [ master-1.12 ]
21-
# types: [opened, synchronize, reopened]
22-
# schedule:
23-
# - cron: '43 7 * * 4'
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- master-1.10.2
7+
- 'feature/**'
8+
pull_request:
9+
branches:
10+
- master-1.10.2
11+
schedule:
12+
- cron: '43 7 * * 4'
13+
14+
permissions:
15+
actions: read
16+
contents: read
17+
security-events: write
2418

2519
jobs:
2620
analyze:
27-
name: Analyze
21+
name: Analyze Java
2822
runs-on: ubuntu-latest
29-
permissions:
30-
actions: read
31-
contents: read
32-
security-events: write
33-
34-
strategy:
35-
fail-fast: false
36-
matrix:
37-
language: [ 'java' ]
38-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
39-
# Learn more:
40-
# 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
23+
timeout-minutes: 45
4124

4225
steps:
43-
- name: Checkout repository
44-
uses: actions/checkout@v2
45-
46-
# Initializes the CodeQL tools for scanning.
47-
- name: Initialize CodeQL
48-
uses: github/codeql-action/init@v1
49-
with:
50-
languages: ${{ matrix.language }}
51-
# If you wish to specify custom queries, you can do so here or in a config file.
52-
# By default, queries listed here will override any specified in a config file.
53-
# Prefix the list here with "+" to use these queries and those in the config file.
54-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
55-
56-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57-
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v1
60-
61-
# ℹ️ Command-line programs to run using the OS shell.
62-
# 📚 https://git.io/JvXDl
63-
64-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
65-
# and modify them (or add more) to build your code if your project
66-
# uses a compiled language
67-
68-
#- run: |
69-
# make bootstrap
70-
# make release
71-
72-
- name: Perform CodeQL Analysis
73-
uses: github/codeql-action/analyze@v1
26+
- name: Check out source
27+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
28+
29+
- name: Install Java 8 toolchain
30+
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
31+
with:
32+
distribution: temurin
33+
java-version: '8.0.502+7'
34+
35+
- name: Install Java 17 for Gradle
36+
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
37+
with:
38+
distribution: microsoft
39+
java-version: '17'
40+
41+
- name: Set up Gradle
42+
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
43+
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
46+
with:
47+
languages: java-kotlin
48+
49+
- name: Compile production code
50+
run: |
51+
chmod +x ./gradlew
52+
./gradlew clean classes --no-daemon --stacktrace
53+
54+
- name: Analyze
55+
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Start OreSpawn release from tag
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*.*'
7+
8+
permissions:
9+
actions: write
10+
contents: read
11+
12+
concurrency:
13+
group: orespawn-release-starter-${{ github.ref_name }}
14+
cancel-in-progress: false
15+
16+
jobs:
17+
dispatch-release:
18+
name: Validate tag and start guarded release
19+
if: github.repository == 'MinecraftModDevelopmentMods/OreSpawn'
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
23+
steps:
24+
- name: Check out tagged source
25+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Validate release tag, target metadata, and prior CI
30+
id: validate
31+
env:
32+
GH_TOKEN: ${{ github.token }}
33+
run: |
34+
set -euo pipefail
35+
36+
value() { sed -n "s/^$1=//p" gradle.properties; }
37+
release_version="$(value mod_version)"
38+
minecraft_version="$(value minecraft_version)"
39+
loader_name="$(value loader_name)"
40+
loader_code="$(value loader_code)"
41+
42+
IFS=. read -r mc_major mc_minor mc_patch extra <<<"$minecraft_version"
43+
if [[ -n "${extra:-}" || -z "${mc_major:-}" || -z "${mc_minor:-}" ]]; then
44+
echo "Invalid minecraft_version=$minecraft_version" >&2
45+
exit 1
46+
fi
47+
mc_patch="${mc_patch:-0}"
48+
if [[ ! "$mc_major" =~ ^[0-9]+$ || ! "$mc_minor" =~ ^[0-9]+$ || ! "$mc_patch" =~ ^[0-9]+$ ]]; then
49+
echo "Invalid minecraft_version=$minecraft_version" >&2
50+
exit 1
51+
fi
52+
case "$loader_name:$loader_code" in
53+
forge:1|neoforge:2) ;;
54+
*) echo "Invalid loader metadata $loader_name/$loader_code" >&2; exit 1 ;;
55+
esac
56+
printf -v minor_padded '%02d' "$((10#$mc_minor))"
57+
printf -v patch_padded '%02d' "$((10#$mc_patch))"
58+
target_suffix="${mc_major}${minor_padded}${patch_padded}${loader_code}"
59+
60+
if [[ ! "$release_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.${target_suffix}$ ]]; then
61+
echo "mod_version $release_version does not match $minecraft_version $loader_name target $target_suffix" >&2
62+
exit 1
63+
fi
64+
if [[ "$GITHUB_REF_NAME" != "$release_version" ]]; then
65+
echo "Release tag must equal mod_version $release_version; found $GITHUB_REF_NAME" >&2
66+
exit 1
67+
fi
68+
69+
successful_ci="$(gh api \
70+
"repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?per_page=100" \
71+
--jq '[.check_runs[] | select(.name == "Build, test, and audit" and .conclusion == "success")] | length')"
72+
if [[ "$successful_ci" -lt 1 ]]; then
73+
echo "The tagged commit has no successful Build, test, and audit check" >&2
74+
exit 1
75+
fi
76+
echo "version=$release_version" >> "$GITHUB_OUTPUT"
77+
78+
- name: Start default-branch release workflow
79+
env:
80+
GH_TOKEN: ${{ github.token }}
81+
RELEASE_VERSION: ${{ steps.validate.outputs.version }}
82+
run: |
83+
gh workflow run deploy-release.yml \
84+
--repo "$GITHUB_REPOSITORY" \
85+
--ref master-1.12 \
86+
-f mode=publish \
87+
-f release_ref="$GITHUB_REF_NAME" \
88+
-f curseforge_channel=release \
89+
-f confirm_version="$RELEASE_VERSION"

.github/workflows/sonarqube.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
name: Validate Gradle Wrapper
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master-1.10.2
7+
- 'feature/**'
8+
pull_request:
9+
branches:
10+
- master-1.10.2
11+
12+
permissions:
13+
contents: read
414

515
jobs:
616
validation:
7-
name: "Validation"
17+
name: Validation
818
runs-on: ubuntu-latest
919
steps:
10-
- uses: actions/checkout@v2
11-
- uses: gradle/wrapper-validation-action@v1
20+
- name: Check out source
21+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
22+
- name: Validate wrapper integrity
23+
uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6

CHANGELOG.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Version 4.0.8.110021
2+
3+
* 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.
4+
* Prevent opening and saving an unchanged editor profile from silently replacing long identifiers or comma-separated lists with truncated values.
5+
* Add reproducible ForgeGradle 7 builds and guarded Maven, CurseForge, and GitHub release automation.
6+
* Keep API major 1, provider/global/world schemas 4/6/5, registry and profile compatibility, migrations, and world-generation semantics unchanged.
7+
18
Version 4.0.6.110021
29

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

0 commit comments

Comments
 (0)