Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
3bc9885
build: establish deterministic version-neutral defaults
mleem97 Jul 28, 2026
99b2d6e
compat: add machine-readable profile schema
mleem97 Jul 28, 2026
1fccd6f
compat: define current Data Center IL2CPP profile
mleem97 Jul 28, 2026
f32f8a0
compat: pin main to the current reference profile
mleem97 Jul 28, 2026
e32af4a
docs: document compatibility profiles and safe mode
mleem97 Jul 28, 2026
9bbc0a7
compat: add runtime fingerprint verification and safe-mode policy
mleem97 Jul 28, 2026
165d5a0
perf: expose event subscriber checks for lazy hooks
mleem97 Jul 28, 2026
7c5846c
perf: avoid hook payload work without subscribers
mleem97 Jul 28, 2026
b3e3e3f
hooks: add versioned full-signature manifest schema
mleem97 Jul 28, 2026
f0c606d
hooks: add current profile v2 manifest seed
mleem97 Jul 28, 2026
136c31d
hooks: implement profile-aware full-signature resolver v2
mleem97 Jul 28, 2026
d89d457
hooks: remove compile-time game type coupling and prefer v2 manifests
mleem97 Jul 28, 2026
5ea9b56
interop: centralize idempotent IL2CPP class injection
mleem97 Jul 28, 2026
2d7de9c
core: gate IL2CPP injection and hooks behind compatibility verification
mleem97 Jul 28, 2026
e3be97c
fix: import LINQ comparer overload for manifest deduplication
mleem97 Jul 28, 2026
ada8a03
build: make reference packs configurable and preserve binary compatib…
mleem97 Jul 28, 2026
4105860
build: add marker source for migration assemblies
mleem97 Jul 28, 2026
a07160b
build: materialize abstractions project boundary
mleem97 Jul 28, 2026
9798479
build: add SDK project boundary
mleem97 Jul 28, 2026
844785e
build: add managed core project boundary
mleem97 Jul 28, 2026
81f97b5
build: add shared utilities project boundary
mleem97 Jul 28, 2026
3328e2d
build: add loader host project boundary
mleem97 Jul 28, 2026
0d120e9
build: add hook adapter project boundary
mleem97 Jul 28, 2026
2c0510e
build: add patch adapter project boundary
mleem97 Jul 28, 2026
d37c263
build: add compatibility adapter project boundary
mleem97 Jul 28, 2026
b946201
build: add scripting and FFI bridge project boundary
mleem97 Jul 28, 2026
5048ed0
build: add UI adapter project boundary
mleem97 Jul 28, 2026
bbcc7eb
build: make strict warning enforcement opt-in
mleem97 Jul 28, 2026
84ed00b
architecture: add loader-neutral host contracts
mleem97 Jul 28, 2026
0dd88af
ci: add compatibility profile validator
mleem97 Jul 28, 2026
a31f8d8
ci: add hook manifest validator
mleem97 Jul 28, 2026
9c1a9c7
compat: add local reference fingerprint capture tool
mleem97 Jul 28, 2026
3bfa9b8
hooks: add deterministic legacy-to-v2 converter
mleem97 Jul 28, 2026
205f2ca
hooks: allow unknown static state during legacy migration
mleem97 Jul 28, 2026
0e4f886
ci: replace push-triggered releases with validation matrix
mleem97 Jul 28, 2026
72fe720
api: establish 1.x compatibility baseline
mleem97 Jul 28, 2026
f90ec50
release: add explicit profile-driven release workflow
mleem97 Jul 28, 2026
6f77754
docs: define Unity and framework branch matrix
mleem97 Jul 28, 2026
301263b
docs: define binary and data backward compatibility guarantees
mleem97 Jul 28, 2026
68fe212
release: add compatibility branch helper for Windows
mleem97 Jul 28, 2026
7b44b46
release: add compatibility branch helper for Unix
mleem97 Jul 28, 2026
db89943
compat: verify complete method signatures with structured results
mleem97 Jul 28, 2026
75a9df8
fix: keep loader contracts compatible with netstandard2.0
mleem97 Jul 28, 2026
0bbe052
fix: simplify opt-in local deployment target
mleem97 Jul 28, 2026
1cbcb47
test: cover compatibility profile verification and safe mode
mleem97 Jul 28, 2026
57a6a61
docs: align support claims with compatibility profiles
mleem97 Jul 28, 2026
042f3a6
fix: align public API baseline namespace casing
mleem97 Jul 28, 2026
b03f5c0
ci: isolate metadata checks and simplify restore diagnostics
mleem97 Jul 28, 2026
511988a
fix: deduplicate Harmony patches across hook IDs and manifests
mleem97 Jul 28, 2026
ed94f17
fix: use version-stable ClassInjector Type overload
mleem97 Jul 28, 2026
a1a2a5b
build: emit stable assembly version metadata for 1.x
mleem97 Jul 28, 2026
9d6fed8
release: require exact verified profiles and atomic refs
mleem97 Jul 28, 2026
ed2d6cc
build: pin the supported .NET 6 SDK feature band
mleem97 Jul 28, 2026
1f6fe81
hooks: keep seed hooks optional until runtime verification
mleem97 Jul 28, 2026
bed63aa
fix: preserve deferred events when governor budget is exhausted
mleem97 Jul 28, 2026
995149c
docs: record version-neutral IL2CPP migration
mleem97 Jul 28, 2026
3c04ea9
docs: record implemented and externally pending compatibility work
mleem97 Jul 28, 2026
fd5ea8c
release: verify runtime version markers before publishing
mleem97 Jul 28, 2026
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
363 changes: 126 additions & 237 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,237 +1,126 @@
name: gregCore CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: write

jobs:
# ─── 1. Auto-bump version on every push to main ───────────────────────────
version-bump:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.bump.outputs.version }}
tag: ${{ steps.bump.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Bump patch version
id: bump
run: |
CURRENT=$(cat VERSION | tr -d '[:space:]')
MAJOR=$(echo "$CURRENT" | cut -d. -f1)
MINOR=$(echo "$CURRENT" | cut -d. -f2)
PATCH=$(echo "$CURRENT" | cut -d. -f3)
# Strip any pre-release suffix from patch
PATCH=$(echo "$PATCH" | grep -oE '^[0-9]+')
NEW_PATCH=$((PATCH + 1))
NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}"
echo "$NEW_VERSION" > VERSION
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
echo "tag=v${NEW_VERSION}" >> "$GITHUB_OUTPUT"
echo "Bumped $CURRENT → $NEW_VERSION"

- name: Update version in .csproj
run: |
V="${{ steps.bump.outputs.version }}"
sed -i "s|<Version>.*</Version>|<Version>$V</Version>|g" gregCore.csproj
sed -i "s|<FileVersion>.*</FileVersion>|<FileVersion>$V</FileVersion>|g" gregCore.csproj
sed -i "s|<AssemblyVersion>.*</AssemblyVersion>|<AssemblyVersion>$V.0</AssemblyVersion>|g" gregCore.csproj

- name: Update version in GregCoreMod.cs
run: |
V="${{ steps.bump.outputs.version }}"
sed -i 's|"gregCore", "[^"]*"|"gregCore", "'"$V"'"|g' src/Core/GregCoreMod.cs
sed -i 's|Framework Boot v[^-"]*|Framework Boot v'"$V"'|g' src/Core/GregCoreMod.cs

- name: Update CHANGELOG
run: |
V="${{ steps.bump.outputs.version }}"
DATE=$(date +%Y-%m-%d)
PREV=$(git log --format="%s" HEAD~1 -1 2>/dev/null || echo "patch update")
ENTRY="## [${V}] - ${DATE}\n\n### Changed\n\n- Auto-release: ${PREV}\n\n"
# Insert after first line (# Changelog)
awk -v entry="$ENTRY" 'NR==1{print; print ""; printf "%s", entry; next} /^## \[/{if(!done){done=1} print; next} {print}' CHANGELOG.md > CHANGELOG.tmp
mv CHANGELOG.tmp CHANGELOG.md

- name: Commit version bump
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add VERSION gregCore.csproj src/Core/GregCoreMod.cs CHANGELOG.md
git commit -m "chore(release): bump version to ${{ steps.bump.outputs.version }} [skip ci]" || echo "Nothing to commit"
git tag "${{ steps.bump.outputs.tag }}"
git push origin main --tags

# ─── 2. Build for Windows & Linux ─────────────────────────────────────────
build:
needs: [ version-bump ]
if: always() && (needs.version-bump.result == 'success' || github.event_name == 'pull_request')
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
include:
- os: windows-latest
rid: win-x64
label: windows
- os: ubuntu-latest
rid: linux-x64
label: linux
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.version-bump.outputs.tag || github.sha }}
fetch-depth: 0

- name: Setup .NET 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

- name: Restore
run: dotnet restore gregCore.csproj

- name: Build Release
run: dotnet build gregCore.csproj -c Release -p:CI=true

- name: Stage MelonLoader artifact
shell: bash
run: |
V=$(cat VERSION | tr -d '[:space:]')
OUT="dist/melonloader-${{ matrix.label }}"
mkdir -p "$OUT/Mods"
cp bin/Release/net6.0/gregCore.dll "$OUT/Mods/"
cp game_hooks.json "$OUT/Mods/"
cp framework/greg_hooks.json "$OUT/Mods/"
cp README.md "$OUT/"
cp CHANGELOG.md "$OUT/"
cd dist
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
powershell -Command "Compress-Archive -Path 'melonloader-${{ matrix.label }}/*' -DestinationPath 'gregCore-v${V}-melonloader-${{ matrix.label }}.zip'"
else
zip -r "gregCore-v${V}-melonloader-${{ matrix.label }}.zip" "melonloader-${{ matrix.label }}"
fi

- name: Stage BepInEx artifact
shell: bash
run: |
V=$(cat VERSION | tr -d '[:space:]')
OUT="dist/bepinex-${{ matrix.label }}"
mkdir -p "$OUT/BepInEx/plugins/gregCore"
cp bin/Release/net6.0/gregCore.dll "$OUT/BepInEx/plugins/gregCore/"
cp game_hooks.json "$OUT/BepInEx/plugins/gregCore/"
cp framework/greg_hooks.json "$OUT/BepInEx/plugins/gregCore/"
cp README.md "$OUT/"
cp CHANGELOG.md "$OUT/"
cd dist
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
powershell -Command "Compress-Archive -Path 'bepinex-${{ matrix.label }}/*' -DestinationPath 'gregCore-v${V}-bepinex-${{ matrix.label }}.zip'"
else
zip -r "gregCore-v${V}-bepinex-${{ matrix.label }}.zip" "bepinex-${{ matrix.label }}"
fi

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: gregCore-${{ matrix.label }}-zips
path: dist/*.zip

# ─── 3. Generate API docs from hook JSONs ─────────────────────────────────
docs:
needs: [ version-bump ]
if: always() && needs.version-bump.result == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.version-bump.outputs.tag }}
fetch-depth: 2

- name: Check if hook files changed
id: changed
run: |
git diff HEAD~1 --name-only 2>/dev/null | grep -E '(game_hooks\.json|framework/greg_hooks\.json)' \
&& echo "changed=true" >> "$GITHUB_OUTPUT" \
|| echo "changed=false" >> "$GITHUB_OUTPUT"

- name: Generate FrameworkAPI docs
if: steps.changed.outputs.changed == 'true'
run: |
python3 scripts/generate_api_docs.py \
--game-hooks game_hooks.json \
--greg-hooks framework/greg_hooks.json \
--output docs/FrameworkAPI.md \
--version "$(cat VERSION)"

- name: Upload docs artifact
if: steps.changed.outputs.changed == 'true'
uses: actions/upload-artifact@v4
with:
name: api-docs
path: docs/FrameworkAPI.md

# ─── 4. Publish release + create version branch ────────────────────────────
release:
needs: [ version-bump, build ]
if: >
github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
needs.build.result == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.version-bump.outputs.tag }}
fetch-depth: 0

- name: Create version branch
run: |
TAG="${{ needs.version-bump.outputs.tag }}"
BRANCH="release/${TAG}"
git checkout -b "$BRANCH"
git push origin "$BRANCH" || true

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: gregCore-*-zips
merge-multiple: true
path: release-assets

- name: Download API docs (if generated)
uses: actions/download-artifact@v4
with:
name: api-docs
path: release-assets
continue-on-error: true

- name: Extract changelog entry
id: changelog
run: |
V="${{ needs.version-bump.outputs.version }}"
# Extract the section for this version from CHANGELOG.md
NOTES=$(awk "/^## \[${V}\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
echo "$NOTES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.version-bump.outputs.tag }}
name: "gregCore ${{ needs.version-bump.outputs.tag }}"
body: ${{ steps.changelog.outputs.notes }}
prerelease: false
files: release-assets/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: gregCore CI

on:
push:
branches:
- main
- 'refactor/**'
- 'compat/**'
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: gregcore-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
profiles:
name: Validate compatibility profiles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python scripts/validate_compat_profiles.py

hooks-v2:
name: Validate hook manifest v2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python scripts/validate_hook_manifest.py framework/game_hooks.v2.json

hooks-legacy:
name: Validate legacy hook JSON syntax
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python -m json.tool game_hooks.json > /dev/null

build:
name: Build and test (${{ matrix.label }})
needs: [profiles, hooks-v2, hooks-legacy]
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
label: windows-x64
- os: ubuntu-latest
label: linux-x64
runs-on: ${{ matrix.os }}
env:
CI: 'true'
DeployToGameOnBuild: 'false'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore solution
run: dotnet restore gregCore.sln --verbosity minimal
- name: Build solution
run: dotnet build gregCore.sln -c Release --no-restore -p:CI=true -p:DeployToGameOnBuild=false --verbosity minimal
- name: Run managed tests
run: dotnet test tests/gregCore.Tests.csproj -c Release --no-build --logger "trx;LogFileName=gregCore-${{ matrix.label }}.trx"
- name: Stage MelonLoader artifact
shell: bash
run: |
set -euo pipefail
VERSION="$(tr -d '[:space:]' < VERSION)"
OUT="dist/gregCore-${VERSION}-melonloader-${{ matrix.label }}"
mkdir -p "$OUT/Mods/gregCore"
cp bin/Release/net6.0/gregCore.dll "$OUT/Mods/gregCore/"
cp game_hooks.json "$OUT/Mods/gregCore/"
cp framework/game_hooks.v2.json "$OUT/Mods/gregCore/"
cp framework/game_hooks.schema.v2.json "$OUT/Mods/gregCore/"
cp -R compat "$OUT/Mods/gregCore/compat"
cp README.md CHANGELOG.md "$OUT/"
cd dist
if [[ "${{ runner.os }}" == "Windows" ]]; then
powershell -NoProfile -Command "Compress-Archive -Path 'gregCore-${VERSION}-melonloader-${{ matrix.label }}/*' -DestinationPath 'gregCore-${VERSION}-melonloader-${{ matrix.label }}.zip'"
else
zip -qr "gregCore-${VERSION}-melonloader-${{ matrix.label }}.zip" "gregCore-${VERSION}-melonloader-${{ matrix.label }}"
fi
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: gregCore-${{ matrix.label }}
path: dist/*.zip
if-no-files-found: error
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.label }}
path: '**/*.trx'
if-no-files-found: ignore

public-api:
name: Public API compatibility baseline
needs: [profiles, hooks-v2]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Ensure shipped API baseline exists
run: test -s eng/PublicApi.Shipped.txt
- name: Build stable contract projects
run: |
dotnet build src/gregCore.Abstractions/gregCore.Abstractions.csproj -c Release -p:CI=true --verbosity minimal
dotnet build src/gregCore.SDK/gregCore.SDK.csproj -c Release -p:CI=true --verbosity minimal
Loading
Loading