From 2390c03046c9ab295b4bbc3c166a9b4297235fd9 Mon Sep 17 00:00:00 2001 From: Trav Date: Tue, 30 Jun 2026 21:51:47 -0600 Subject: [PATCH 1/4] Clone ItemsAdder items on creation --- .../codex/api/items/providers/ItemsAdderProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-api/src/main/java/studio/magemonkey/codex/api/items/providers/ItemsAdderProvider.java b/codex-api/src/main/java/studio/magemonkey/codex/api/items/providers/ItemsAdderProvider.java index 7aae2686..726ce132 100644 --- a/codex-api/src/main/java/studio/magemonkey/codex/api/items/providers/ItemsAdderProvider.java +++ b/codex-api/src/main/java/studio/magemonkey/codex/api/items/providers/ItemsAdderProvider.java @@ -82,7 +82,7 @@ public Category getCategory() { @Override public ItemStack create() { - return this.customStack.getItemStack(); + return this.customStack.getItemStack().clone(); } @Override From d8cb2894e82b57a23c1af1c7de19d09a2ef4bc35 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 18:34:38 +0000 Subject: [PATCH 2/4] Switch to semantic versioning with weekly dev and monthly release builds Same change as magemonkeystudio/divinity#349. CI no longer commits version bumps. The shared reusable-semver-build.yml works out the version from the last release tag and the major/minor/patch labels of the PRs merged since, then passes it to Maven as -Drevision/-Dchangelist. - pom.xml and pom-dev.xml: ${revision}${changelist} plus flatten-maven-plugin. codex-api, codex-core, codex-plugin and codex-bungee point their at the same expression (they inherit from pom.xml in both builds). The codex-nms modules keep their own fixed versions, as before. - devbuild.yml: weekly X.Y.Z-SNAPSHOT of dev from pom-dev.xml (Mondays 12:17 UTC), skipped when nothing was committed that week. - release.yml: monthly X.Y.Z release from pom.xml with the Spigot BuildTools step (1st of the month 13:23 UTC, before Fabled and Divinity). It tags dev, deploys, creates a GitHub release and fast-forwards main. - semver-label.yml: PRs into dev need exactly one of major, minor or patch. Dependabot PRs get patch. - README: the version comes from a release badge. This also fixes the badge links, which pointed at "magemonkeystudios". Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Secz6aiBJ7U8im8tnYhyLA --- .github/dependabot.yml | 3 +++ .github/workflows/devbuild.yml | 22 +++++++++++++++----- .github/workflows/release.yml | 24 +++++++++++++++++----- .github/workflows/semver-label.yml | 11 ++++++++++ .gitignore | 3 ++- README.md | 8 +++++--- codex-api/pom.xml | 2 +- codex-bungee/pom.xml | 2 +- codex-core/pom.xml | 2 +- codex-plugin/pom.xml | 2 +- doc/README.md | 8 +++++--- pom-dev.xml | 33 +++++++++++++++++++++++++++++- pom.xml | 33 +++++++++++++++++++++++++++++- 13 files changed, 130 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/semver-label.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9cf49d94..5daa7213 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,6 +10,9 @@ updates: schedule: interval: "weekly" target-branch: "dev" + labels: + - "dependencies" + - "patch" open-pull-requests-limit: 10 reviewers: - Travja diff --git a/.github/workflows/devbuild.yml b/.github/workflows/devbuild.yml index 9ff9ec2d..63ca2792 100644 --- a/.github/workflows/devbuild.yml +++ b/.github/workflows/devbuild.yml @@ -1,15 +1,27 @@ name: Dev Build +# Weekly X.Y.Z-SNAPSHOT build of dev, where X.Y.Z is the next release (see release.yml). +# Skipped when nothing was committed that week; run it by hand to publish one sooner. on: - push: - branches: [ dev ] - paths: [ '**/src/**' ] + schedule: + - cron: '17 12 * * 1' # Mondays 12:17 UTC + workflow_dispatch: + inputs: + dry_run: + description: 'Only compute and print the version' + type: boolean + default: false + +permissions: + contents: write + pull-requests: read jobs: deploy: - uses: magemonkeystudio/.github/.github/workflows/reusable-build.yml@main + uses: magemonkeystudio/.github/.github/workflows/reusable-semver-build.yml@main secrets: inherit with: - is_dev: true + mode: dev + dry_run: ${{ inputs.dry_run || false }} maven_args: '-f pom-dev.xml' artifact_filter: 'codex' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6cef12b9..0f367d9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,29 @@ name: Release Build +# Monthly X.Y.Z release of dev. The bump is the highest major/minor/patch label among +# the PRs merged since the last release. Tags the release, publishes it, creates a +# GitHub release and fast-forwards main to it. Skipped when nothing changed. on: - push: - branches: [ main ] - paths: [ '**/src/**' ] + schedule: + - cron: '23 13 1 * *' # 1st of the month 13:23 UTC, before Fabled and Divinity + workflow_dispatch: + inputs: + dry_run: + description: 'Only compute and print the version' + type: boolean + default: false + +permissions: + contents: write + pull-requests: read jobs: deploy: - uses: magemonkeystudio/.github/.github/workflows/reusable-build.yml@main + uses: magemonkeystudio/.github/.github/workflows/reusable-semver-build.yml@main secrets: inherit with: - is_dev: false + mode: release + release_branch: main + dry_run: ${{ inputs.dry_run || false }} build_spigot: true artifact_filter: 'codex' diff --git a/.github/workflows/semver-label.yml b/.github/workflows/semver-label.yml new file mode 100644 index 00000000..eaecf3ad --- /dev/null +++ b/.github/workflows/semver-label.yml @@ -0,0 +1,11 @@ +name: Semver Label + +# Every PR into dev needs exactly one of: major, minor, patch +on: + pull_request: + types: [ opened, reopened, labeled, unlabeled, synchronize ] + branches: [ dev ] + +jobs: + label: + uses: magemonkeystudio/.github/.github/workflows/reusable-semver-label.yml@main diff --git a/.gitignore b/.gitignore index 552cb86f..398664ef 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ settings.xml toolchains.xml log.txt logs/ -**/build/*.jar \ No newline at end of file +**/build/*.jar +.flattened-pom.xml diff --git a/README.md b/README.md index 8c926644..55b148bf 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -[![Build](https://github.com/magemonkeystudios/codex/actions/workflows/release.yml/badge.svg?branch=main)](https://repo.travja.dev/releases/studio/magemonkey/codex/1.2.0-R0.7-SNAPSHOT) -[![Build](https://github.com/magemonkeystudios/codex/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://repo.travja.dev/snapshots/studio/magemonkey/codex/1.2.0-R0.7-SNAPSHOT) +[![Release](https://img.shields.io/github/v/release/magemonkeystudio/codex?label=release)](https://github.com/magemonkeystudio/codex/releases/latest) +[![Dev Build](https://github.com/magemonkeystudio/codex/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://github.com/magemonkeystudio/codex/actions/workflows/devbuild.yml) [![Discord](https://dcbadge.limes.pink/api/server/mQrkW4htUA?style=flat)](https://discord.gg/mQrkW4htUA) # Codex (Formerly ProMCCore) If you wish to use Codex as a dependency in your projects, Codex is available through our repository at [repo.travja.dev](https://repo.travja.dev). +Use the latest release version shown above, or `X.Y.Z-SNAPSHOT` (the next release) for the weekly dev build. + ```xml magemonkey-snapshots @@ -15,7 +17,7 @@ If you wish to use Codex as a dependency in your projects, Codex is available th studio.magemonkey codex - 1.2.0-R0.7-SNAPSHOT + VERSION ``` diff --git a/codex-api/pom.xml b/codex-api/pom.xml index aff010cd..c8a379e4 100644 --- a/codex-api/pom.xml +++ b/codex-api/pom.xml @@ -6,7 +6,7 @@ studio.magemonkey codex-parent - 1.2.0-R0.8-SNAPSHOT + ${revision}${changelist} codex-api diff --git a/codex-bungee/pom.xml b/codex-bungee/pom.xml index 5af6f58d..3c7f8268 100644 --- a/codex-bungee/pom.xml +++ b/codex-bungee/pom.xml @@ -6,7 +6,7 @@ studio.magemonkey codex-parent - 1.2.0-R0.8-SNAPSHOT + ${revision}${changelist} codex-bungee diff --git a/codex-core/pom.xml b/codex-core/pom.xml index 05207f5c..dba57ce6 100644 --- a/codex-core/pom.xml +++ b/codex-core/pom.xml @@ -6,7 +6,7 @@ studio.magemonkey codex-parent - 1.2.0-R0.8-SNAPSHOT + ${revision}${changelist} codex-core diff --git a/codex-plugin/pom.xml b/codex-plugin/pom.xml index b2fa4e77..07543edb 100644 --- a/codex-plugin/pom.xml +++ b/codex-plugin/pom.xml @@ -6,7 +6,7 @@ studio.magemonkey codex-parent - 1.2.0-R0.8-SNAPSHOT + ${revision}${changelist} codex diff --git a/doc/README.md b/doc/README.md index 6b250bea..b95cfa14 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,11 +1,13 @@ -[![Build](https://github.com/magemonkeystudios/codex/actions/workflows/release.yml/badge.svg?branch=main)](https://repo.travja.dev/releases/studio/magemonkey/codex/${project.version}) -[![Build](https://github.com/magemonkeystudios/codex/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://repo.travja.dev/snapshots/studio/magemonkey/codex/${project.version}) +[![Release](https://img.shields.io/github/v/release/magemonkeystudio/${project.artifactId}?label=release)](https://github.com/magemonkeystudio/${project.artifactId}/releases/latest) +[![Dev Build](https://github.com/magemonkeystudio/${project.artifactId}/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://github.com/magemonkeystudio/${project.artifactId}/actions/workflows/devbuild.yml) [![Discord](https://dcbadge.limes.pink/api/server/mQrkW4htUA?style=flat)](https://discord.gg/mQrkW4htUA) # Codex (Formerly ProMCCore) If you wish to use Codex as a dependency in your projects, Codex is available through our repository at [repo.travja.dev](https://repo.travja.dev). +Use the latest release version shown above, or `X.Y.Z-SNAPSHOT` (the next release) for the weekly dev build. + ```xml magemonkey-snapshots @@ -15,7 +17,7 @@ If you wish to use Codex as a dependency in your projects, Codex is available th ${project.groupId} codex - ${project.version} + VERSION ``` diff --git a/pom-dev.xml b/pom-dev.xml index a492a235..c6d782b2 100644 --- a/pom-dev.xml +++ b/pom-dev.xml @@ -11,7 +11,10 @@ codex-parent - 1.2.0-R0.8-SNAPSHOT + + ${revision}${changelist} pom The core plugin for VoidEdge plugins @@ -23,6 +26,8 @@ + 1.2.0 + -SNAPSHOT ${project.build.directory}/javadoc-delombok @@ -188,6 +193,32 @@ + + + org.codehaus.mojo + flatten-maven-plugin + 1.7.3 + + true + resolveCiFriendliesOnly + + + + flatten + process-resources + + flatten + + + + flatten-clean + clean + + clean + + + + diff --git a/pom.xml b/pom.xml index 875df070..c63b47a3 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,10 @@ codex-parent - 1.2.0-R0.8-SNAPSHOT + + ${revision}${changelist} pom CodexParent The core plugin for VoidEdge plugins @@ -25,6 +28,8 @@ + 1.2.0 + -SNAPSHOT ${project.build.directory}/javadoc-delombok @@ -190,6 +195,32 @@ + + + org.codehaus.mojo + flatten-maven-plugin + 1.7.3 + + true + resolveCiFriendliesOnly + + + + flatten + process-resources + + flatten + + + + flatten-clean + clean + + clean + + + + From 13d3c4546e4578718dd6d89268fc26f12ba4d229 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 21:49:27 +0000 Subject: [PATCH 3/4] Use build:major/minor/patch labels for version bumps Dependabot adds plain major/minor/patch labels by itself, based on the dependency's own version jump. The shared workflows now read prefixed build:* labels and ignore the plain ones. Dependabot PRs get build:patch here instead of patch. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Secz6aiBJ7U8im8tnYhyLA --- .github/dependabot.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/semver-label.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 85b7a84f..d2946715 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -28,7 +28,7 @@ updates: target-branch: "dev" labels: - "dependencies" - - "patch" + - "build:patch" registries: - magemonkey-releases - magemonkey-snapshots diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f367d9f..19f1d4a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ name: Release Build -# Monthly X.Y.Z release of dev. The bump is the highest major/minor/patch label among +# Monthly X.Y.Z release of dev. The bump is the highest build:major/minor/patch label among # the PRs merged since the last release. Tags the release, publishes it, creates a # GitHub release and fast-forwards main to it. Skipped when nothing changed. on: diff --git a/.github/workflows/semver-label.yml b/.github/workflows/semver-label.yml index eaecf3ad..d8a7c32e 100644 --- a/.github/workflows/semver-label.yml +++ b/.github/workflows/semver-label.yml @@ -1,6 +1,6 @@ name: Semver Label -# Every PR into dev needs exactly one of: major, minor, patch +# Every PR into dev needs exactly one of: build:major, build:minor, build:patch on: pull_request: types: [ opened, reopened, labeled, unlabeled, synchronize ] From 2540c5834120a4a074162d125e849ba72538fcd7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 18:27:28 +0000 Subject: [PATCH 4/4] Show version and build status badges for both release and dev The README now has a release version badge next to the Release Build status badge, and a dev snapshot version badge next to the Dev Build status badge. The dev version is read from the snapshot repo's maven-metadata.xml using shields.io's highestVersion strategy, because the metadata has no entry. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Secz6aiBJ7U8im8tnYhyLA --- README.md | 2 ++ doc/README.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 55b148bf..99747e16 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ [![Release](https://img.shields.io/github/v/release/magemonkeystudio/codex?label=release)](https://github.com/magemonkeystudio/codex/releases/latest) +[![Release Build](https://github.com/magemonkeystudio/codex/actions/workflows/release.yml/badge.svg?branch=dev)](https://github.com/magemonkeystudio/codex/actions/workflows/release.yml) +[![Dev](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo.travja.dev%2Fsnapshots%2Fstudio%2Fmagemonkey%2Fcodex%2Fmaven-metadata.xml&strategy=highestVersion&label=dev)](https://repo.travja.dev/#/snapshots/studio/magemonkey/codex) [![Dev Build](https://github.com/magemonkeystudio/codex/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://github.com/magemonkeystudio/codex/actions/workflows/devbuild.yml) [![Discord](https://dcbadge.limes.pink/api/server/mQrkW4htUA?style=flat)](https://discord.gg/mQrkW4htUA) diff --git a/doc/README.md b/doc/README.md index b95cfa14..cca58884 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,6 @@ [![Release](https://img.shields.io/github/v/release/magemonkeystudio/${project.artifactId}?label=release)](https://github.com/magemonkeystudio/${project.artifactId}/releases/latest) +[![Release Build](https://github.com/magemonkeystudio/${project.artifactId}/actions/workflows/release.yml/badge.svg?branch=dev)](https://github.com/magemonkeystudio/${project.artifactId}/actions/workflows/release.yml) +[![Dev](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo.travja.dev%2Fsnapshots%2Fstudio%2Fmagemonkey%2F${project.artifactId}%2Fmaven-metadata.xml&strategy=highestVersion&label=dev)](https://repo.travja.dev/#/snapshots/studio/magemonkey/${project.artifactId}) [![Dev Build](https://github.com/magemonkeystudio/${project.artifactId}/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://github.com/magemonkeystudio/${project.artifactId}/actions/workflows/devbuild.yml) [![Discord](https://dcbadge.limes.pink/api/server/mQrkW4htUA?style=flat)](https://discord.gg/mQrkW4htUA)