-
Notifications
You must be signed in to change notification settings - Fork 27
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,3 +87,28 @@ jobs: | |
run: docker build -t ghcr.io/policyengine/policyengine docker | ||
- name: Push container | ||
run: docker push ghcr.io/policyengine/policyengine | ||
Publish: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
if: | | ||
(github.repository == 'PolicyEngine/policyengine-api') | ||
&& (github.event.head_commit.message == 'Update PolicyEngine API') | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Publish a git tag | ||
run: ".github/publish-git-tag.sh || true" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
- name: Install package | ||
run: make install | ||
- name: Build package | ||
run: make | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, I ran this locally (just |
||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
password: ${{ secrets.PYPI }} | ||
skip-existing: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- bump: patch | ||
changes: | ||
added: | ||
- Job to auto-publish to PyPI |
There was a problem hiding this comment.
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?