Skip to content

Automatically deploy to example mod#170

Merged
modmuss50 merged 52 commits into
FabricMC:mainfrom
CelDaemon:template-deploy
Apr 8, 2026
Merged

Automatically deploy to example mod#170
modmuss50 merged 52 commits into
FabricMC:mainfrom
CelDaemon:template-deploy

Conversation

@CelDaemon

@CelDaemon CelDaemon commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

This PR adds a deployment workflow that automatically deploys to the example mod repo.

A DEPLOY_KEY secret is required, which must be an SSH deploy key with write access to the example mod repository.

It is triggered when any push to the main branch affects the workflow itself, or any files in scripts or cli.

After being triggered, the workflow retrieves the list of currently supported Minecraft versions, and selects the ones to publish for. All major (release) versions will be used, with the latest minor version selected.
It will then generate a template for each of those versions, and publish to the corresponding existing branch, or to a new branch if one does not exist yet.

See https://github.com/CelDaemon/fabric-example-mod/ for the results of running this workflow on the current state of the repo.

P.S.

I also recommend turning off the webhook for the example mod, as many branches are pushed to at once.

#171 should also be merged to preserve the README.md in the generated template.

CelDaemon added 30 commits April 3, 2026 20:36
Let's hope this works!
Matrices my beloved.
Don't get ahead of yourselves now...
I really can't type can I.
Maybe actually build your dependencies, silly...
Well, this is awkward.
Second time's the charm?
Maybe I should test some things locally? Nahhh!
Surely deleting everything can't go wrong, right?
Just surrended yourself to our lord and saviour Git.
Fabric CLI whyyyy.... I know what I'm doinggg! (lies)
Seems like Fabric CLI still prompts for advanced options even when the
session is not interactive, causing it to get stuck.

Welp, that's another oversight to fix...
If only github would allow for sharing some step configs TwT
Who cares if it isn't standard? It's GNU standard!
Prevents enabling datagen and split sources on Minecraft versions on
which Loom does not support it.

Good spot, Modmuss!
Smh, use proper glob implementations GitHub!
Silly Git, who cares if we're doing useless work?
What could possibly go wrong?
Unfortunately the checkout action has no easy way to do this...
It's master you dingus, not main...
Why oh why, is this not a built-in thing...
I should read up on git plumbing commands....
Let's try something new :3
@CelDaemon

Copy link
Copy Markdown
Contributor Author

Just noticed the README.md is missing, I wonder what the best way to add that would be.

@modmuss50

Copy link
Copy Markdown
Member

Just noticed the README.md is missing, I wonder what the best way to add that would be.

Can you just copt the file from somewhere in this repo?

@CelDaemon

Copy link
Copy Markdown
Contributor Author

Can you just copt the file from somewhere in this repo?

Yeah will do, what would be a good place to put it?
It's a little disjointed from the rest of the repo.

@deirn

deirn commented Apr 8, 2026

Copy link
Copy Markdown
Member

I think inside .github/scripts since it's related to the workflow.
I would argue to move .github/scripts to .github/workflows/scripts, even.

@CelDaemon CelDaemon force-pushed the template-deploy branch 2 times, most recently from a1b542d to 1cdd0f1 Compare April 8, 2026 08:00
Comment thread .github/scripts/template-versions.ts Outdated
Comment thread .github/workflows/deploy-template.yml Outdated
Comment thread .github/workflows/deploy-template.yml Outdated
Comment thread .github/workflows/deploy-template.yml Outdated
Comment thread .github/scripts/template-versions.ts Outdated
@CelDaemon CelDaemon force-pushed the template-deploy branch 2 times, most recently from bdf1dfa to 16fba4d Compare April 8, 2026 12:19
Comment thread .github/workflows/deploy-template.yml Outdated
@modmuss50 modmuss50 merged commit 5059c39 into FabricMC:main Apr 8, 2026
1 check passed
@CelDaemon CelDaemon deleted the template-deploy branch April 8, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants