From 27eff27561810cc5a83b29c650fa9fcad49f094a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexej=20Tu=C5=A1l?= <72282274+xefensor@users.noreply.github.com> Date: Mon, 20 Jul 2026 02:48:47 +0200 Subject: [PATCH 1/2] Publish Retold backfills as alpha --- .github/workflows/backfill-release.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/backfill-release.yml b/.github/workflows/backfill-release.yml index 9220adb..9bb3110 100644 --- a/.github/workflows/backfill-release.yml +++ b/.github/workflows/backfill-release.yml @@ -64,17 +64,8 @@ jobs: exit 1 fi - case "$VERSION" in - *-alpha*|*-snapshot*) - release_type="alpha" - ;; - *-beta*|*-rc*) - release_type="beta" - ;; - *) - release_type="release" - ;; - esac + # Retold is currently in alpha, independent of its numeric version. + release_type="alpha" echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "tag=$tag" >> "$GITHUB_OUTPUT" From cf564bf2d126e08796f47f6f2d5cb62c0ad66212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexej=20Tu=C5=A1l?= <72282274+xefensor@users.noreply.github.com> Date: Mon, 20 Jul 2026 02:55:37 +0200 Subject: [PATCH 2/2] Use alpha release channel and simplify recovery --- .github/workflows/release.yml | 13 +- .../workflows/repair-curseforge-changelog.yml | 117 ------------------ docs/RELEASING.md | 16 +-- 3 files changed, 3 insertions(+), 143 deletions(-) delete mode 100644 .github/workflows/repair-curseforge-changelog.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c841a89..b6e987f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,17 +59,8 @@ jobs: exit 1 fi - case "$version" in - *-alpha*|*-snapshot*) - release_type="alpha" - ;; - *-beta*|*-rc*) - release_type="beta" - ;; - *) - release_type="release" - ;; - esac + # Retold is currently in alpha, independent of its numeric version. + release_type="alpha" echo "version=$version" >> "$GITHUB_OUTPUT" echo "tag=$tag" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/repair-curseforge-changelog.yml b/.github/workflows/repair-curseforge-changelog.yml deleted file mode 100644 index 982f57b..0000000 --- a/.github/workflows/repair-curseforge-changelog.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: Repair CurseForge Changelog - -on: - workflow_dispatch: - inputs: - version: - description: 'Version whose changelog should be repaired, without the v prefix' - required: true - type: string - curseforge_file_id: - description: 'Numeric CurseForge file ID from the file page URL' - required: true - type: string - -permissions: - contents: read - -concurrency: - group: repair-curseforge-changelog-${{ inputs.curseforge_file_id }} - cancel-in-progress: false - -jobs: - repair: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - - name: Validate request - id: version - env: - VERSION: ${{ inputs.version }} - CURSEFORGE_FILE_ID: ${{ inputs.curseforge_file_id }} - CURSEFORGE_PROJECT_ID: ${{ vars.CURSEFORGE_PROJECT_ID }} - CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} - shell: bash - run: | - if [[ -z "$VERSION" ]]; then - echo "A version is required" >&2 - exit 1 - fi - - if [[ ! "$CURSEFORGE_FILE_ID" =~ ^[0-9]+$ ]]; then - echo "CurseForge file ID must be numeric" >&2 - exit 1 - fi - - [[ -n "$CURSEFORGE_PROJECT_ID" ]] || { echo "CURSEFORGE_PROJECT_ID is missing" >&2; exit 1; } - [[ -n "$CURSEFORGE_TOKEN" ]] || { echo "CURSEFORGE_TOKEN is missing" >&2; exit 1; } - - tag="v$VERSION" - if ! git rev-parse --verify --quiet "refs/tags/$tag" >/dev/null; then - echo "Git tag $tag does not exist" >&2 - exit 1 - fi - - echo "tag=$tag" >> "$GITHUB_OUTPUT" - - - name: Extract release notes from the tagged source - env: - TAG: ${{ steps.version.outputs.tag }} - VERSION: ${{ inputs.version }} - shell: bash - run: | - git show "$TAG:CHANGELOG.md" > tagged-changelog.md - - awk -v version="$VERSION" ' - index($0, "## " version " - ") == 1 { capture = 1; next } - capture && /^## / { exit } - capture { print } - ' tagged-changelog.md > release-notes.md - - if [[ ! -s release-notes.md ]]; then - echo "Release notes for $VERSION are missing or empty in $TAG" >&2 - exit 1 - fi - - - name: Render changelog as HTML - env: - GH_TOKEN: ${{ github.token }} - shell: bash - run: | - jq -Rs '{ text: ., mode: "gfm" }' release-notes.md \ - | gh api --method POST markdown --input - \ - > curseforge-release-notes.html - - if [[ ! -s curseforge-release-notes.html ]]; then - echo "Rendered CurseForge changelog is empty" >&2 - exit 1 - fi - - - name: Update CurseForge changelog - env: - CURSEFORGE_PROJECT_ID: ${{ vars.CURSEFORGE_PROJECT_ID }} - CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} - CURSEFORGE_FILE_ID: ${{ inputs.curseforge_file_id }} - shell: bash - run: | - jq -cn \ - --argjson fileID "$CURSEFORGE_FILE_ID" \ - --rawfile changelog curseforge-release-notes.html \ - '{ fileID: $fileID, changelog: $changelog, changelogType: "html" }' \ - > curseforge-update.json - - response="$(curl --fail-with-body --silent --show-error \ - --request POST \ - --header "X-Api-Token: $CURSEFORGE_TOKEN" \ - --form "metadata=&2 - exit 1 - fi diff --git a/docs/RELEASING.md b/docs/RELEASING.md index 800f7df..b6f716a 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -93,24 +93,10 @@ When all checks pass, the workflow publishes: - an HTML-rendered copy of those notes on CurseForge to preserve headings, lists, and inline code - NeoForge, Minecraft 26.2, Java 25, and client-and-server metadata -Versions containing `-alpha` or `-snapshot` publish as alpha. Versions containing `-beta` or `-rc` publish as beta. Other versions publish as releases. +Retold currently publishes every version as **alpha** on Modrinth and CurseForge, and as a prerelease on GitHub. This is intentional even when the version is a plain number such as `0.2.1`. When Retold is ready to move to beta or stable, update the explicit `release_type` assignment in both publishing workflows. ## Manual Recovery The workflow can also be started from **Actions → Release → Run workflow**. Enter the version without the `v` prefix. The entered version must still match `mod_version`, and every normal validation and publishing step still runs. Use manual publishing only when the release tag workflow did not start. If a run partially publishes, first inspect GitHub, Modrinth, and CurseForge. Either upload the missing platform manually, or delete every version and GitHub release created by the failed run before retrying. The existing Git tag can remain in place. - -## Repair A CurseForge Changelog - -Use **Actions → Repair CurseForge Changelog → Run workflow** when a CurseForge file already exists but its changelog was flattened or otherwise formatted incorrectly. - -1. Open the affected file in the CurseForge author dashboard. -2. Copy the numeric file ID from the file page URL. -3. Open **Actions → Repair CurseForge Changelog → Run workflow** in GitHub. -4. Enter the version without the `v` prefix and the numeric CurseForge file ID. -5. Run the workflow. - -The repair workflow reads the matching release section from the tagged `CHANGELOG.md`, renders it to HTML with GitHub's Markdown renderer, and updates only that existing CurseForge file. It does not upload another JAR or modify GitHub or Modrinth. - -New normal and backfilled releases perform this HTML update automatically after the CurseForge upload.