Skip to content

EXP-1213: Add GitHub Actions release automation#25

Open
Adonis-Diaz wants to merge 5 commits into
masterfrom
EXP-1213-release-tooling
Open

EXP-1213: Add GitHub Actions release automation#25
Adonis-Diaz wants to merge 5 commits into
masterfrom
EXP-1213-release-tooling

Conversation

@Adonis-Diaz

Copy link
Copy Markdown

This PR adds GitHub Actions–based release automation for pystalk: a new .github/workflows/release.yml that builds the sdist/wheel (via a new justfile with install/build targets using uv) and publishes to PyPI plus uploads release assets whenever a GitHub release is published, along with a minimal pyproject.toml setuptools build-system config, a .gitignore entry for .venv/, and a README.md update describing the new tag-and-publish release workflow in place of the old manual python setup.py sdist upload process.

…ignore

- justfile: add missing 'install' recipe header (was a bare unindented
  command with no recipe name, breaking the whole file's parsing), and
  rename 'Build' -> 'build' to match idiomatic naming and the call site
  in release.yml.
- pyproject.toml: fix 'requies' -> 'requires' typo (mandatory PEP 518
  key) and 'setup-tools' -> 'setuptools' (correct PyPI package name).
- release.yml: fix invalid YAML (missing space after 'uses:', and the
  'Upload assets to release' step was mis-indented as a nested item
  under the previous step instead of a sibling step).
- .gitignore: add .venv/ alongside the existing venv/ entry so the new
  uv-based tooling's virtualenv isn't accidentally committed.
@Adonis-Diaz
Adonis-Diaz requested a review from a team as a code owner July 22, 2026 16:26
@Adonis-Diaz Adonis-Diaz mentioned this pull request Jul 22, 2026
Comment thread .github/workflows/release.yml Fixed
Comment thread .github/workflows/release.yml Outdated
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- uses: actions/checkout@v6
- uses: actions/checkout@v7

Comment thread .github/workflows/release.yml Outdated
- uses: actions/checkout@v6
- uses: extractions/setup-just@v3
- uses: astral-sh/setup-uv@v7
- uses: actions/setup-python@v6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
- uses: actions/setup-python@v6
- uses: actions/setup-python@v7

Comment thread justfile Outdated
@@ -0,0 +1,7 @@
# Install the project and build its dependencies.
install:
uv pip install --system -e . -r requirements-tests.txt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Python project must use their own virtual environments to ensure that dependencies don't mix or conflict with other projects. Installing system-wide as written can create various problems, best to be avoided.

Suggested change
uv pip install --system -e . -r requirements-tests.txt
uv venv
uv pip install -e . -r requirements-tests.txt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note that you still need to remove the --system flag as that'll install them system-wide.

Comment thread justfile Outdated

# build sdist and wheel into dist/
build:
uv build

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

praise: nice, TIL uv has a build command!

Comment thread README.md Outdated
1. Bump the version in `setup.py` and `pystalk/__init__.py` to the stable version (e.g., `0.2`)
1. Bump the version in `setup.py` and `pystalk/__init__.py` to the stable version (e.g., `0.9.0`)
1. Update [`CHANGES.rst`](docs/source/CHANGES.rst) with the changes and the new version number
1. Update [`conf.py`](docs/source/conf.py) with the new version number

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this line isn't needed

Suggested change
1. Update [`conf.py`](docs/source/conf.py) with the new version number

Comment thread pyproject.toml
@@ -0,0 +1,3 @@
[build-system]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if we're committing to switching to uv over standard venv (which I'm fine with but wasn't intending to be included here), then we should convert the setup.py file to be in this pyproject.toml file to consolidate build metadata. You can use the easypost-python file as a template to follow. You'll then want to remove this repos setup.py file.

Comment thread README.md Outdated
1. Push up to Github
1. Upload to PyPI with `python setup.py sdist upload`
1. Commit and push up to Github
1. Draft a [new GitHub Release](https://github.com/EasyPost/pystalk/releases/new), targeting a new tag matching the version (e.g., `pystalk-0.9.0`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

versions don't include the name, not sure why that's suggested here.

Suggested change
1. Draft a [new GitHub Release](https://github.com/EasyPost/pystalk/releases/new), targeting a new tag matching the version (e.g., `pystalk-0.9.0`)
1. Draft a [new GitHub Release](https://github.com/EasyPost/pystalk/releases/new), targeting a new tag matching the version (e.g., `0.9.0`)

Comment on lines +10 to +28
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: extractions/setup-just@v3
- uses: astral-sh/setup-uv@v7
- uses: actions/setup-python@v7
with:
python-version: '3.14'
- name: Build package
run: just install build
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Upload assets to release
uses: AButler/upload-release-assets@v3.0.1
with:
files: 'dist/*'
repo-token: ${{ secrets.GITHUB_TOKEN }} No newline at end of file
Comment on lines +10 to +27
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: extractions/setup-just@v3
- uses: actions/setup-python@v7
with:
python-version: '3.14'
- name: Build package
run: just install build
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Upload assets to release
uses: AButler/upload-release-assets@v3.0.1
with:
files: 'dist/*'
repo-token: ${{ secrets.GITHUB_TOKEN }} No newline at end of file
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