-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from tbirdso/automate-publish
ENH: Automate deploy to PyPI
- Loading branch information
Showing
1 changed file
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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 |