Skip to content

CI: desktop preview GitHub Release (no Maven), with examples - #338

Merged
b-re-w merged 1 commit into
developfrom
feat/desktop-release-workflow
Oct 25, 2026
Merged

b-re-w merged 1 commit into
developfrom
feat/desktop-release-workflow

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 25, 2026

Copy link
Copy Markdown
Member

Prepares the first desktop release (leader item 8). Only the workflow is added here; the leader does release -> main and the tag.

Trigger: pushing a tag v- (today v3.15.0-alpha01), or workflow_dispatch for an existing tag. The tag must match the build's version.

Assets (.github/scripts/release/assemble-desktop-release.sh, the same script I ran locally):

  • python-multiplatform-maven-repo-.zip: a Maven repository under org/thisisthepy, built with -Dmaven.repo.local and never ~/.m2. It contains:
    • the library's desktop artifact, which carries libpython for macOS arm64 and x86_64, Linux x86_64 and Windows x86_64, plus the KMP root;
    • python-multiplatform-ksp with its typedpython-gate zip;
    • the Gradle plugin and its marker.
      The script fails if any io.github.thisisthepy coordinate appears.
  • typedpython-0.1.0-py3-none-any.whl (uv build of python-multiplatform-ksp/pyproject.toml).
  • python-multiplatform-ksp--typedpython-gate.zip.
  • python-multiplatform-examples-.zip (docs/release/desktop, with the version filled in).
  • SHA256SUMS.

Examples (docs/release/desktop/README.md; the README also becomes the release notes):

  1. kotlin-hello: a kotlin("jvm") + application project with plugin org.thisisthepy.python.multiplatform.bindings and dependency org.thisisthepy:python-multiplatform. Main.kt initialises Python, runs code and evaluates an expression.
  2. typedpython/kernels.py: 'typedpython demo kernels.py 400000' with the wheel installed into a fresh 3.15t venv.
    The workflow runs both from the unzipped assets alone and checks their output before it uploads anything.

Verified locally (macOS arm64):

  • The script produced all 5 assets.
  • Example 1, from the unzipped repository with an empty maven.repo.local, printed 'Python 3.15.0 from Kotlin', '{"sum": 45}' and 'Kotlin sees: 42'.
  • Example 2, with the wheel in a fresh uv 3.15t venv, compiled dot, collatz_steps and main, with identical output.
  • The workflow's grep checks pass on those outputs, and the YAML parses.

Not verified:

  • The workflow itself on GitHub (it runs only on a tag).
  • Running on Linux or Windows hosts (their libpython is in the jar but no consumer run was made there).
  • Gradle versions other than the repository's 8.11.1 wrapper.

Found while writing example 1, not fixed here:

  • Python3.finalize() is internal, so a consumer cannot shut down or flush the interpreter. The example flushes sys.stdout itself; without that, Python's prints are lost at JVM exit.
  • Python3.eval takes (expr, start, globals, locals) and has no one-argument convenience.

On a v* tag (or by hand for an existing tag) desktop-release.yml assembles, on macOS, a Maven
repository zip (library desktop artifact with every desktop libpython, KSP processor and gate zip,
Gradle plugin and marker; built with -Dmaven.repo.local, never ~/.m2), the typedpython wheel, the gate
zip, an examples zip and SHA256SUMS; runs both examples from those assets alone (a Kotlin app calling
Python, and typedpython demo); and only then creates or updates the pre-release. Nothing goes to
Maven Central. The tag must equal v<pythonVersion>-<libraryVersionSuffix>.
@b-re-w
b-re-w merged commit ba60621 into develop Oct 25, 2026
@b-re-w
b-re-w deleted the feat/desktop-release-workflow branch October 25, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant