Skip to content

Commit

Permalink
adding pypi release to github actions on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Mar 6, 2024
1 parent 17180f5 commit 8e81703
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ name: EMAnnotationSchemas
on:
push:
branches: master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches: master


jobs:
test:
name: Test against different Python versions
Expand Down Expand Up @@ -60,3 +63,26 @@ jobs:
- name: Test with pytest
run: |
pytest
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Build and publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist
verify_metadata: true
env:
# Ensure dependencies are installed and your package is built
PRE_BUILD_COMMANDS: >-
pip install build &&
python -m build

0 comments on commit 8e81703

Please sign in to comment.