From 9dc9c48d11f7af10a1b4a03d01aaeaa9a05c712a Mon Sep 17 00:00:00 2001 From: NHagar Date: Wed, 3 Apr 2024 19:11:49 -0500 Subject: [PATCH] release workflow update --- .github/workflows/release.yml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d798e7a..b7c3053 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,21 +1,14 @@ -name: Publish to PyPI +name: Python package on: - release: - types: [published] - + push: + tags: + - "v*.*.*" jobs: - pypi_release: - name: Builds Using Poetry and Publishes to PyPI + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - name: Install Poetry - run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - - name: Add Poetry to path - run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH - - run: poetry install - - run: poetry run pytest - - run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}" - - name: Publish package - run: poetry publish --build \ No newline at end of file + - uses: actions/checkout@v3 + - name: Build and publish to pypi + uses: JRubics/poetry-publish@v2.0 + with: + pypi_token: ${{ secrets.PYPI_API_KEY }} \ No newline at end of file