Skip to content

Commit

Permalink
Merge pull request #1 from JesseMckinzie/ci_cd_v2
Browse files Browse the repository at this point in the history
Add Workflow to build and publish wheels to PyPI
  • Loading branch information
hsidky authored May 4, 2023
2 parents c089408 + 3986816 commit 4170f61
Show file tree
Hide file tree
Showing 8 changed files with 2,932 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Auto detect text files and perform LF normalization
* text=auto
napari_nyxus/_version.py export-subst
29 changes: 29 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to PyPi

on:
release:
types: [published]

workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip twine build
- name: Build wheels
run: python -m build
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_REPOSITORY: pypi
run:
python -m twine upload dist/*.whl
4 changes: 4 additions & 0 deletions napari_nyxus/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import _version
__version__ = _version.get_versions()['version']
from . import _version
__version__ = _version.get_versions()['version']
Loading

0 comments on commit 4170f61

Please sign in to comment.