Files
saturnclient/.gitea/workflows/modrinth.yml
T
selimaj-devandclaude 5bcdc72b83 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]>
2026-09-25 19:16:55 +02:00

37 lines
1.2 KiB
YAML

name: Publish to Modrinth
# Publishes the jars already attached to a Gitea release (built by the Release
# workflow) to Modrinth, one version per Minecraft version. Run it manually
# after smoke-testing the release. It doesn't rebuild anything, and versions
# already on Modrinth are skipped, so re-running is safe.
#
# Needs a MODRINTH_TOKEN repository secret: a Modrinth PAT with the
# "Create versions" scope.
on:
workflow_dispatch:
inputs:
tag:
description: Tag of the Gitea release to publish
required: true
dry_run:
description: Only check and print what would be published
type: boolean
default: false
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish to Modrinth
env:
TAG: ${{ inputs.tag }}
DRY_RUN: ${{ inputs.dry_run }}
SERVER_URL: ${{ github.server_url }}
REPO: ${{ github.repository }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
# Node is always available on Gitea runners (it runs JavaScript actions).
run: node .gitea/scripts/publish_modrinth.mjs