You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/publish-helm.yml
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -92,8 +92,20 @@ jobs:
92
92
run: |
93
93
version="${{ inputs.version }}"
94
94
# Convert PEP440 version to SemVer if needed for Helm versioning
95
-
# Handle cases like 1.0.0.dev20250218 -> 1.0.0-dev.20250218
95
+
# Handle cases like:
96
+
# 1.0.0.dev20250218 -> 1.0.0-dev.20250218
97
+
# 0.11.0rc0 -> 0.11.0-rc.0
98
+
# 0.11.0a1 -> 0.11.0-alpha.1
99
+
# 0.11.0b2 -> 0.11.0-beta.2
100
+
# 0.11.0.post1 -> 0.11.0+post.1
96
101
semversion=$(echo "$version" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+)\.dev([0-9]+)/\1-dev.\2/')
102
+
semversion=$(echo "$semversion" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+)rc([0-9]+)/\1-rc.\2/')
103
+
semversion=$(echo "$semversion" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+)a([0-9]+)/\1-alpha.\2/')
104
+
semversion=$(echo "$semversion" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+)b([0-9]+)/\1-beta.\2/')
105
+
# Post-releases use build metadata (+) since SemVer has no direct equivalent to PEP440's .post
106
+
# PEP440 .post means "after release", but SemVer build metadata has same precedence.
107
+
# TODO(romilb): If both 0.11.0 and 0.11.0+post.1 exist, Helm's "latest" behavior is undefined - some sources claim the newer one wins. Need to verify this.
108
+
semversion=$(echo "$semversion" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+)\.post([0-9]+)/\1+post.\2/')
97
109
98
110
# Update the version and name in the main skypilot chart
99
111
sed -i "s/^version:.*$/version: ${semversion}/" src/charts/skypilot/Chart.yaml
0 commit comments