Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add job to auto-publish to PyPI in workflows #1508

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lordgrim18
Copy link
Collaborator

Fixes #284 .

What's changed

This PR introduces a new job to the GitHub workflow for automated publishing to PyPI.

Changes Made

  • Added the Publish job to the .github/workflows/push.yml file.
  • When a commit with the message "Update PolicyEngine API" is made, the Publish job is triggered, resulting in the publication of a Python distribution to PyPI.

Requires

PyPI token in secrets as PYPI

@lordgrim18
Copy link
Collaborator Author

Hey @anth-volk could you review this, reopened pr #1496

@anth-volk
Copy link
Collaborator

Thanks so much, @lordgrim18, will review today.

@anth-volk anth-volk self-requested a review May 10, 2024 14:56
Copy link
Collaborator

@anth-volk anth-volk left a comment

Choose a reason for hiding this comment

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

Thanks for this, @lordgrim18, GitHub Actions maintenance is something that has been lacking on this repo. I had a few questions, suggestions, and comments, and look forward to your responses! Thanks again.

- name: Install package
run: make install
- name: Build package
run: make
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity, I ran this locally (just make), and this also runs make install, not any build action. Out of curiosity, were you shooting for a different make script? Or alternatively, is this deprecated/a mistake/a different package that is necessary for this to work?

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see this defined anywhere else in the code. Is it possible that this is meant as a stand-in for a different value?

- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
Copy link
Collaborator

Choose a reason for hiding this comment

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

We use actions/setup-python@v5 elsewhere in this script. If this must be v4, could you comment that in here somewhere? Otherwise, could you fix at v5?

with:
python-version: 3.9
- name: Publish a git tag
run: ".github/publish-git-tag.sh || true"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity, just because I'm new to this, what's the purpose of this line?

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.

Auto-publish to PyPI
2 participants