Skip to content

Mark prerelease tags as prereleases on the GitHub release #827

Description

@alexeyzimarev

The Create GitHub Release step in .github/workflows/release.yml (softprops/action-gh-release) sets neither prerelease nor make_latest, so a prerelease tag is published as a normal release and takes the Latest badge.

Observed after cutting v0.12.0-beta.1 on 2026-09-08:

$ gh release view v0.12.0-beta.1 --json isPrerelease --jq .isPrerelease
false
$ gh release list --limit 2
v0.12.0-beta.1   Latest   2026-09-08
v0.11.40                  2026-09-08

npm is unaffected: scripts/npm-dist-tag.sh already routes a prerelease to the beta dist-tag, and kcap update reads dist-tags, not GitHub releases. The damage is limited to GitHub itself: the releases page and releases/latest point at the beta instead of the stable release.

Fix: derive the flag from the tag the same way the npm dist-tag does (a hyphen in the version core) and keep prereleases off the Latest badge:

      - name: Create GitHub Release
        uses: softprops/action-gh-release@v3
        with:
          files: release-artifacts/*
          generate_release_notes: true
          prerelease: ${{ contains(github.ref_name, '-') }}
          make_latest: ${{ !contains(github.ref_name, '-') }}

v0.12.0-beta.1 itself can be corrected by hand (gh release edit v0.12.0-beta.1 --prerelease, then gh release edit v0.11.40 --latest).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions