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