Skip to content

Commit

Permalink
use api token
Browse files Browse the repository at this point in the history
  • Loading branch information
Man Parvesh Singh Randhawa committed Oct 4, 2024
1 parent 9fca020 commit cad5170
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ jobs:
- name: Run Tests
run: poetry run pytest

# Publish to PyPI
- name: Configure pypi api token
if: github.ref == 'refs/heads/v2' && github.event_name == 'push'
run: poetry config pypi-token.pypi $PYPI_API_TOKEN
env:
$PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

- name: Build the package
if: github.ref == 'refs/heads/v2' && github.event_name == 'push'
run: poetry build

- name: Publish to PyPI
if: github.ref == 'refs/heads/v2' && github.event_name == 'push'
run: poetry publish --username $PYPI_USERNAME --password $PYPI_PASSWORD
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: poetry publish

0 comments on commit cad5170

Please sign in to comment.