Skip to content

Conversation

@ylangtsou
Copy link
Collaborator

Description

This commit introduces a complete GitHub Actions workflow for automatically building and publishing the Python package to PyPI.

  • Adds the release.yml workflow, supporting multiple triggers: Tag push and Schedule.
  • Adds the determine_release_vars.sh script, which contains the core versioning logic.

Tests

github

Checklist

Before submitting this PR, please make sure:

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.

@github-actions
Copy link

Description

Start with a short description of what the PR does and how this is a change from
the past.

The rest of the description includes relevant details and context, examples:

  • why is this change being made,
  • the problem being solved and any relevant context,
  • why this is a good solution,
  • some information about the specific implementation,
  • shortcomings of the solution and possible future improvements.

If the change fixes a bug or a Github issue, please include a link, e.g.,:
FIXES: b/123456
FIXES: #123456

Tests

Please describe how you tested this change, and include any instructions and/or
commands to reproduce.

Checklist

Before submitting this PR, please make sure:

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have made or will make corresponding changes to any relevant documentation.

@@ -0,0 +1,51 @@
name: Publish Package to PyPI
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your current setup will lead to triggering the release workflow even if the tag is created on a non-main branch.

We only want the release tag to go off if it's created on the protected (main) branch. This is required to ensure only admins or selected people can trigger a stable release via release tag

This commit introduces a complete GitHub Actions workflow for automatically building and publishing the Python package to PyPI.

- Adds the `release.yml` workflow, supporting multiple triggers: Tag push and Schedule.
- Adds the `determine_release_vars.sh` script, which contains the core versioning logic.

Signed-off-by: Ylang Tsou <ylangt@google.com>
@ylangtsou ylangtsou force-pushed the ylang/publish_package_to_pypi branch from a1d7ca1 to dad3324 Compare November 4, 2025 01:06
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.

3 participants