Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ jobs:
set -euo pipefail
PRE_TAG="${{ inputs.prerelease_tag }}"
PRE_TAG="v${PRE_TAG#v}" # normalize leading v
# Strip the -pre.N (and any +build) suffix to get the stable version.
STABLE_VERSION=$(printf '%s' "${PRE_TAG#v}" | sed -E 's/-pre\..*$//; s/\+.*$//')
# Strip the pre-release (-<n>) and any +build suffix to get the
# stable version, e.g. 0.4.0-185 -> 0.4.0.
STABLE_VERSION=$(printf '%s' "${PRE_TAG#v}" | sed -E 's/-.*$//; s/\+.*$//')
STABLE_TAG="v${STABLE_VERSION}"

# The commit the pre-release was built from (deref annotated tags).
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ jobs:
BASE=$(printf '%s' "$CUR" | awk -F. '{printf "%d.%d.%d", $1, $2, $3 + 1}')
echo "No open release PR; patch-bumping current ($CUR) -> $BASE"
fi
PRE="${BASE}-pre.${{ github.run_number }}"
# The pre-release identifier MUST be numeric-only (a single SemVer
# identifier, no "pre." word): the Windows MSI bundler maps it to the
# 4th version field and rejects non-numeric / >65535 values. So use
# "<base>-<run_number>", e.g. 0.4.0-185. Ordering still holds:
# 0.3.0 < 0.4.0-185 < 0.4.0-186 < 0.4.0. (run_number stays < 65535.)
PRE="${BASE}-${{ github.run_number }}"
echo "version=$PRE" >> "$GITHUB_OUTPUT"
echo "Pre-release version: $PRE"

Expand Down
Loading