Skip to content

Conversation

@yunks128
Copy link
Contributor

Purpose

  • Automate the build and publishing process of the SLIM CLI Python package to PyPI upon pushing a version tag.

Proposed Changes

  • [ADD] New GitHub Actions workflow .github/workflows/publish-to-pypi.yml that:
    • Extracts version from the pushed tag
    • Updates src/jpl/slim/VERSION.txt
    • Builds the package using build
    • Publishes it to PyPI using twine
  • [CHANGE] Updated README.md with detailed instructions on how to tag a new release and trigger publishing workflow

Issues

Testing

  • Verified publishing workflow using tag v0.0.8
  • Confirmed VERSION.txt update and successful build step
  • Verified PyPI publication trigger using stored PYPI_API_TOKEN secret

@yunks128 yunks128 requested a review from riverma April 16, 2025 05:49
Copy link
Collaborator

@riverma riverma left a comment

Choose a reason for hiding this comment

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

@yunks128 - would you be able to lookup best practices on PyPI / GitHub workflow automation? It might be a good idea to monitor main for changes and automatically push to PyPI whenever main changes (as opposed to tagged branches). The alternative is tagged branches as you've suggested, but it'd be good to ensure we don't need to update the version in any code file like the workflow file.

@ingyhere
Copy link

Python 3.7 was end-of-life in June of '23. Python 3.8 was EOL in October '24.1 I would respectfully suggest modifying pyproject.toml to reflect a newer version than 3.7.

Footnotes

  1. For more information, see https://devguide.python.org/versions/#unsupported-versions .

@ingyhere
Copy link

Also, this example is a little different but it is using Trusted Publishing which ensures that releases are marked as trusted in the PyPi UI (otherwise they report unverified origin). Note that there is no explicit declaration of API tokens. It's also different because the project layout is using the src top-level directory, not sure how or if that impacts anything. The ideal solution will be a hybrid.

@jl-0 jl-0 requested a review from Copilot April 17, 2025 18:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR automates the process of publishing the SLIM CLI Python package to PyPI by introducing a new GitHub Actions workflow and updating the README with detailed publishing instructions.

  • Added a GitHub Actions workflow that extracts the version from pushed tags, updates VERSION.txt, builds the package, and publishes it to PyPI.
  • Updated the README to include step-by-step instructions for creating and pushing version tags, as well as how to remove tags if necessary.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
README.md Updated release instructions with detailed steps
.github/workflows/publish-to-pypi.yml New workflow to automate version extraction, build, and PyPI publishing

@ingyhere ingyhere dismissed their stale review April 29, 2025 07:16

This PR is implementing a different approach to release management. Before re-reviewing the topic should be discussed further to provide a more topical and meaningful review.

@yunks128
Copy link
Contributor Author

yunks128 commented May 1, 2025

@riverma: consider google's "release please"

yunks128 and others added 2 commits May 1, 2025 22:09
Automatically generated by python-semantic-release
@sonarqubecloud
Copy link

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