Skip to content

Add action to publish to PyPI#839

Merged
corranwebster merged 3 commits into
mainfrom
enh/add-pypi-release-action
Oct 28, 2022
Merged

Add action to publish to PyPI#839
corranwebster merged 3 commits into
mainfrom
enh/add-pypi-release-action

Conversation

@corranwebster
Copy link
Copy Markdown
Contributor

@corranwebster corranwebster commented Oct 28, 2022

This will need appropriate secrets added.

Copy link
Copy Markdown
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

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

Looks fine to me in principle; it's annoying that there's no way to test before merging to main.

I've left a few nitpicks on the first job; most of those also apply to the second, but I didn't leave duplicate comments.

Comment thread .github/workflows/release-to-pypi.yml Outdated
steps:

- name: Check out the release commit
uses: actions/checkout@v2
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.

Suggest using the latest version here:

Suggested change
uses: actions/checkout@v2
uses: actions/checkout@v3

Comment thread .github/workflows/release-to-pypi.yml Outdated
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
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.

Consider using Python 3.10, for longevity?

Comment thread .github/workflows/release-to-pypi.yml Outdated
if: runner.os == 'Linux'

- name: Set up Python
uses: actions/setup-python@v2
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.

Suggest using latest version

Suggested change
uses: actions/setup-python@v2
uses: actions/setup-python@v4

Comment thread .github/workflows/release-to-pypi.yml Outdated

- name: Install Python packages needed for wheel build and upload
run: |
python -m pip install --upgrade pip setuptools
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.

Nitpick: This step shouldn't be needed: if we have a pyproject.toml, we don't need setuptools, and pip is automatically updated to the latest version by the setup-python action.

Comment thread .github/workflows/release-to-pypi.yml Outdated
- name: Install Python packages needed for wheel build and upload
run: |
python -m pip install --upgrade pip setuptools
python -m pip install twine wheel
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.

I don't think we need wheel here.

@corranwebster corranwebster merged commit c364423 into main Oct 28, 2022
@corranwebster corranwebster deleted the enh/add-pypi-release-action branch October 28, 2022 12:02
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