fabric-release
Skill4 starsChanged 13 days agoMITView on GitHub
Release a Fabric mod - semantic versioning, changelogs, reproducible jars, and publishing to Modrinth, CurseForge and GitHub Releases from GitHub Actions with tokens kept in GitHub Secrets. Use when preparing a release, bumping a version, writing release automation, or when asked to "publish", "upload to Modrinth" or "make a release".
- Reads credentials
- Commits and pushes
In this repository10 other files it gives its agents.
- checkSkill
- fabric-client-renderingSkill
- fabric-config-and-keybindsSkill
- fabric-crash-debuggingSkill
- fabric-mixinsSkill
- fabric-networkingSkill
- fabric-project-setupSkill
- fabric-version-portingSkill
- newSkill
- portSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 14
Use Semantic Versioning for the mod and put the Minecraft version in build metadata:
- Very specific: line 39
Keep CHANGELOG.md in "Keep a Changelog" format (https://keepachangelog.com): an ## [Unreleased] section that every PR updates, renamed to …
- Very specific: line 57
Commit the Gradle wrapper (gradlew, gradle/wrapper/*) and verify it in CI (gradle/actions/wrapper-validation or the setup-gradle action's …
- Very specific: line 71
Never put a token in gradle.properties, build.gradle, a workflow file, .env, a commit message, or a log line.
- Distinctive: line 144
All changes merged; main is green in CI.
- Very specific: line 149
Commit: chore(release): 1.4.2.
- Distinctive: line 151
Verify the Modrinth / CurseForge / GitHub pages: correct file, game versions, loader, and dependencies.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fabric release
A release is a jar that someone else will run. It must be built by CI from a tagged commit, with a clear version and changelog, and published without any credential ever touching the repository.
Versioning
Use Semantic Versioning for the mod and put the Minecraft version in build metadata:
<major>.<minor>.<patch>+<minecraft_version> e.g. 1.4.2+26.3- major: breaking change for users or dependent mods (config format reset, removed feature, changed public API, world-data incompatibility).
- minor: new feature, new Minecraft version port, backwards-compatible.
- patch: bug fix only.
- Pre-releases:
1.5.0-beta.1+26.3. Mark them as beta/alpha on Modrinth as well. fabric.mod.jsongets the version throughprocessResources("version": "${version}"); set it in one place,gradle.properties:
mod_version=1.4.2
minecraft_version=<...>version = "${project.mod_version}+${project.minecraft_version}"Changelog
Keep CHANGELOG.md in "Keep a Changelog" format (https://keepachangelog.com): an
## [Unreleased] section that every PR updates, renamed to ## [1.4.2] - YYYY-MM-DD at
release time, with Added / Changed / Fixed / Removed groups written for players, not for
developers. CI can extract the section for the release body.
Reproducible builds
Same commit -> byte-identical jar. Add to build.gradle:
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}Also:
- Commit the Gradle wrapper (
gradlew,gradle/wrapper/*) and verify it in CI (gradle/actions/wrapper-validationor thesetup-gradleaction's built-in validation). - Pin every dependency to an exact version in
gradle.properties- no+,latest.releaseor-SNAPSHOTin a release build (the template'sloom_versionuses-SNAPSHOT; that is acceptable for the build plugin, but pin it if you need bit-for-bit reproducibility). - Build releases only in CI from a tag, never from a developer machine.
- The artifact to publish is
build/libs/<name>-<version>.jarfrom thejartask on 26.1+, or fromremapJaron older versions. Never publish-sourcesor-devjars as the main file.
Secrets - the non-negotiable part
- Tokens (Modrinth PAT, CurseForge API token) live only in GitHub -> Settings -> Secrets
and variables -> Actions, referenced as
${{ secrets.MODRINTH_TOKEN }},${{ secrets.CURSEFORGE_TOKEN }}. GitHub's own token is${{ secrets.GITHUB_TOKEN }}. - Never put a token in
gradle.properties,build.gradle, a workflow file,.env, a commit message, or a log line. If one was ever committed, revoke it immediately - deleting the commit does not un-leak it. - Give tokens the minimum scope (Modrinth: create/write versions for the project only) and
give the workflow minimal
permissions:. - Workflows triggered by
pull_requestfrom forks do not get secrets; never switch topull_request_targetto "fix" that for a publish job. - Pin third-party actions to a full commit SHA (with the version in a comment) so a compromised tag cannot steal your token.
Publishing workflow (GitHub Actions)
Triggered by pushing a tag like v1.4.2. Look up the current major versions / commit SHAs of
each action before using this; the ones below are placeholders to fill in.
# .github/workflows/release.yml
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write # create the GitHub Release
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@<sha> # vX
- uses: actions/setup-java@<sha> # vX
with:
distribution: temurin
java-version: "25" # what your MC version requires
- uses: gradle/actions/setup-gradle@<sha> # vX (also validates the wrapper)
- name: Check tag matches mod_version
run: |
v=$(grep '^mod_version=' gradle.properties | cut -d= -f2)
test "v$v" = "${GITHUB_REF_NAME}" || { echo "Tag ${GITHUB_REF_NAME} != mod_version $v"; exit 1; }
- run: ./gradlew build
- name: Publish to Modrinth, CurseForge and GitHub
uses: Kir-Antipov/mc-publish@<sha> # vX - check its README for current inputs
with:
modrinth-id: <MODRINTH_PROJECT_ID>
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: <CURSEFORGE_PROJECT_ID>
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/libs/!(*-@(dev|sources|javadoc)).jar
loaders: fabric
version-type: release
changelog-file: CHANGELOG.md
dependencies: |
fabric-api(required)Alternatives:
- Minotaur (
com.modrinth.minotaur, Modrinth's official Gradle plugin) - publish from a Gradle task; read the token fromSystem.getenv("MODRINTH_TOKEN"), never from a property file. Docs: https://github.com/modrinth/minotaur - GitHub only:
gh release create "$GITHUB_REF_NAME" build/libs/*.jar --notes-file notes.mdwithGH_TOKEN: ${{ secrets.GITHUB_TOKEN }}.
Project ids (Modrinth slug/id, CurseForge numeric id) are public and may be committed; tokens may not.
Release checklist
- All changes merged;
mainis green in CI. mod_versionbumped;CHANGELOG.mdsection dated; README "supported versions" updated.fabric.mod.jsondependsranges are correct for the target Minecraft version(s)../gradlew buildlocally, thenrunClient(andrunServerfor non-client-only mods) on the built jar in a clean instance with only required dependencies.- Commit:
chore(release): 1.4.2; tag:git tag -a v1.4.2 -m "v1.4.2". - Push the tag only with the maintainer's approval; CI builds and publishes.
- Verify the Modrinth / CurseForge / GitHub pages: correct file, game versions, loader, and dependencies; download and launch the published jar once.
Common mistakes
- Putting
modrinth.token=...ingradle.properties(even "local" ones get committed) or echoing a secret in a workflow step. - Publishing from a laptop instead of CI; publishing an untagged commit.
- Uploading the
-dev,-sourcesor a non-remapped jar. - Version in the jar (
fabric.mod.json) not matching the tag or the Modrinth version number. - Declaring every Minecraft version since 1.20 as compatible on Modrinth without testing.
- Forgetting to mark Fabric API as a required dependency on Modrinth/CurseForge.
- Changelog written as commit hashes instead of user-facing changes.
- Using
pull_request_targetor unpinned third-party actions in a job that has publish tokens. - Reusing a version number for a different jar (Modrinth and players' launchers cache by version).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

