Skip to content

feat: Add GitHub Release workflow for Python SDK#46

Merged
wanlin31 merged 1 commit intogoogle:mainfrom
wanlin31:python-release
Sep 15, 2025
Merged

feat: Add GitHub Release workflow for Python SDK#46
wanlin31 merged 1 commit intogoogle:mainfrom
wanlin31:python-release

Conversation

@wanlin31
Copy link
Copy Markdown
Collaborator

@wanlin31 wanlin31 commented Sep 10, 2025

This PR introduces a new release process for the Python SDK, distributing it as a wheel file attached to GitHub Releases instead of publishing it to PyPI. This approach allows us to version and distribute the SDK without treating it as a standalone product.

Python release process

  • New Versioning Scheme: Python SDK tags will now follow a composite format, sdks/python/v[SDK_VERSION]-core.[CORE_VERSION], to link each SDK release directly to the version of the core Go executable it wraps.

    • Core Go Executable Tag: v[CORE_VERSION] (Example: v0.2.8)
    • Python SDK Tag: sdks/python/v[SDK_VERSION]-core.[CORE_VERSION] (Example: sdks/python/v0.1.0-core.0.2.8)
  • Automated Release Workflow: A new GitHub Actions workflow (release-python-sdk.yml) triggers automatically when a tag matching sdks/python/v* is pushed.

    • The workflow builds the Python wheel (.whl).
    • It creates a new draft GitHub Release.
    • The built wheel is attached as a release asset.

And we then set up the a release workflow that looks for tag that start with sdks/python/v, and build the artifact attach to a draft release.

Usage

Users can now install a specific version of the Python SDK directly from GitHub Releases using

pip install https://github.com/google/test-server/releases/download/[TAG]/[WHEEL_FILE_NAME].whl

Example

pip install https://github.com/google/test-server/releases/download/sdks/python/v0.1.0-core.0.2.7/test_server_sdk-0.1.0-py3-none-any.whl 

Test:

Since the we used a fork method, the build actually trigged on my fork. Once this is merged, the tag will trigger the release on upstream.

Create a release

git tag sdks/python/v0.1.0-core.0.2.7-test
git push origin sdks/python/v0.1.0-core.0.2.7-test

Successfully triggered the build on pushing the tag

Screenshot 2025-09-10 at 8 31 00 PM

Build finish successfully

Screenshot 2025-09-10 at 8 31 56 PM Screenshot 2025-09-10 at 8 32 34 PM

Created draft release

Screenshot 2025-09-10 at 8 32 54 PM

Clean up the test

git push --delete origin sdks/python/v0.1.0-core.0.2.7-test
git tag -d sdks/python/v0.1.0-core.0.2.7-test

@wanlin31 wanlin31 marked this pull request as ready for review September 10, 2025 20:10
@wanlin31 wanlin31 changed the title add python separate release artifact feat: Add GitHub Release workflow for Python SDK Sep 11, 2025
@wanlin31 wanlin31 requested review from Annhiluc and hkt74 September 11, 2025 01:09
Copy link
Copy Markdown
Collaborator

@Annhiluc Annhiluc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we be able to do something similar for other languages?

git push origin sdks/python/v0.1.0-core.0.2.8
```
4. Find the draft release, verify the executable is built and uplaoaded successfully.
5. Publish the relase No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a command for this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think npm and pip support this most seamlessly, golang is more on the fetch the code directly, dotnet and java may need some workaround, they might need to download the artifact and install from local.

As of now JS and Dotnet has already been published, this exercises is trying to not avoid publishing the python test-server-sdk itself as a product.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. For the 'publish the release' step is there a command for this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you click into the draft release, it looks like this
Screenshot 2025-09-12 at 10 04 34 AM

We can make the release public by clicking the publish button on the bottom.

@wanlin31 wanlin31 requested a review from Annhiluc September 12, 2025 13:22
@wanlin31 wanlin31 merged commit 8b6b05d into google:main Sep 15, 2025
2 checks passed
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.

2 participants