Skip to content

fix: auto-detect pre-release vs release in create-release workflow #362

@lioraron

Description

@lioraron

Problem

The create-release.yml workflow does not set the prerelease flag explicitly. GitHub's legacy auto-detection marked v0.1.0 as a pre-release, requiring a manual fix via the UI.

Proposed change

Add a prerelease condition to the softprops/action-gh-release step that checks for a - in the tag name (per semver spec, pre-release versions use a hyphen):

prerelease: ${{ contains(github.ref_name, '-') }}

This ensures:

  • Tags like v0.1.0-rc1, v1.0.0-alpha.2 → marked as Pre-release
  • Tags like v0.1.0, v1.0.0 → marked as Release

File to change

.github/workflows/create-release.yml — the Create GitHub Release step (currently lines 122-131).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions