@ondeinference / onde / commits / a720595

Fix release workflow package rewrite and action runtimes

Seto Elkahfi committed May 19, 2026 at 18:19 UTC a720595203a907f9206c513eb906c6513fd6ec2b
2 files changed +23 -13
.github/workflows/release-sdk-kotlin.yml
+4 -4
@@ -32,14 +32,14 @@ jobs:
32
33 # ── Java ──────────────────────────────────────────────────────────────────
34 - name: Set up JDK 17
35 - uses: actions/setup-java@v4
35 + uses: actions/setup-java@v5
36 with:
37 java-version: "17"
38 distribution: temurin
39
40 # ── Gradle ───────────────────────────────────────────────────────────────
41 - name: Set up Gradle
42 - uses: gradle/actions/setup-gradle@v3
42 + uses: gradle/actions/setup-gradle@v4
43 with:
44 gradle-version: wrapper
45 build-root-directory: sdk/kotlin
@@ -157,7 +157,7 @@ jobs:
157 find sdk/kotlin/lib/build/libs -name "*.jar" -exec cp {} dist/kotlin/ \;
158
159 - name: Upload build outputs as workflow artifact
160 - uses: actions/upload-artifact@v4
160 + uses: actions/upload-artifact@v7
161 with:
162 name: onde-inference-kotlin-${{ github.ref_name }}
163 path: dist/kotlin/
@@ -166,7 +166,7 @@ jobs:
166 # ── GitHub Release ────────────────────────────────────────────────────────
167 - name: Create GitHub Release
168 if: startsWith(github.ref, 'refs/tags/')
169 - uses: softprops/action-gh-release@v2
169 + uses: softprops/action-gh-release@v3
170 with:
171 tag_name: ${{ github.ref_name }}
172 name: Kotlin SDK ${{ github.ref_name }}
.github/workflows/release-sdk-swift.yml
+19 -9
@@ -99,7 +99,7 @@ jobs:
99
100 - name: Upload XCFramework artifacts
101 if: github.event_name == 'workflow_dispatch'
102 - uses: actions/upload-artifact@v4
102 + uses: actions/upload-artifact@v7
103 with:
104 name: onde-swift-xcframework
105 path: |
@@ -114,7 +114,7 @@ jobs:
114
115 - name: Create GitHub Release
116 if: startsWith(github.ref, 'refs/tags/') || inputs.publish
117 - uses: softprops/action-gh-release@v2
117 + uses: softprops/action-gh-release@v3
118 with:
119 tag_name: ${{ steps.release.outputs.release_tag }}
120 name: ${{ steps.release.outputs.release_tag }}
@@ -157,13 +157,23 @@ jobs:
157 re.MULTILINE,
158 )
159
160 - updated, url_count = url_pattern.subn(rf'\1{url}\3', src, count=1)
161 - updated, checksum_count = checksum_pattern.subn(rf'\1{checksum}\3', updated, count=1)
162 -
163 - if url_count != 1:
164 - raise RuntimeError("releaseFrameworkURL pattern did not match — check Package.swift format")
165 - if checksum_count != 1:
166 - raise RuntimeError("releaseFrameworkChecksum pattern did not match — check Package.swift format")
160 + def replace_constant(pattern, value, text, label):
161 + updated_text, count = pattern.subn(
162 + lambda match: f"{match.group(1)}{value}{match.group(3)}",
163 + text,
164 + count=1,
165 + )
166 + if count != 1:
167 + raise RuntimeError(f"{label} pattern did not match - check Package.swift format")
168 + return updated_text
169 +
170 + updated = replace_constant(url_pattern, url, src, "releaseFrameworkURL")
171 + updated = replace_constant(
172 + checksum_pattern,
173 + checksum,
174 + updated,
175 + "releaseFrameworkChecksum",
176 + )
177
178 pkg.write_text(updated)
179 print("Package.swift updated:")