Skip to content

Commit

Permalink
Merge pull request #25 from tbirdso/automate-publish
Browse files Browse the repository at this point in the history
ENH: Automate deploy to PyPI
  • Loading branch information
thewtex authored Nov 17, 2023
2 parents 70213f0 + 52391b1 commit 631fc0c
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: 'build-test-publish'

on:
[push, pull_request]
[push, pull_request]

environment:
name: pypi
url: https://pypi.org/p/<your-pypi-project-name>
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

jobs:
build_wheel:
Expand Down Expand Up @@ -57,3 +63,21 @@ jobs:
shell: bash
run: |
pytest ./test -vvv -s -k "not localcluster and not serialize_pairwise_result"
publish:
needs:
- build_wheel
- pytest
runs-on: ubuntu-22.04
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
steps:
- name: Download Python Wheel Artifact
uses: actions/download-artifact@v3
with:
name: wheel
path: dist

- name: "Publish Python wheel to the Python Package Index"
uses: pypa/[email protected]
with:
skip_existing: true

0 comments on commit 631fc0c

Please sign in to comment.