Publish to Modrinth with Node instead of Python

actions/setup-python can only install Python on GitHub's Ubuntu images,
so it fails on this runner's job image ("version 3.12 ... was not found
for this operating system"). Every Gitea runner has Node, since it runs
JavaScript actions, so port the publisher to a dependency-free Node
script (fetch/FormData/Blob) and drop the setup step. Behaviour is
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-25 19:16:55 +02:00
co-authored by claude
parent 3f0670ea9d
commit 5bcdc72b83
3 changed files with 166 additions and 173 deletions
+2 -6
View File
@@ -25,11 +25,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Publish to Modrinth
env:
TAG: ${{ inputs.tag }}
@@ -37,4 +32,5 @@ jobs:
SERVER_URL: ${{ github.server_url }}
REPO: ${{ github.repository }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
run: python .gitea/scripts/publish_modrinth.py
# Node is always available on Gitea runners (it runs JavaScript actions).
run: node .gitea/scripts/publish_modrinth.mjs