Skip to content

Commit

Permalink
ci: use an action for publishing to pypi with poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
mblackgeo committed Mar 30, 2022
1 parent af6c4f4 commit 82e69e4
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to TestPyPI
run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi ${{ secrets.TEST_PYPI_API_TOKEN }}
poetry publish --build -r testpypi
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_name: "testpypi"
repository_url: "https://test.pypi.org/legacy/"

- name: Test install from TestPyPI
run: |
Expand All @@ -89,7 +90,7 @@ jobs:
--extra-index-url https://pypi.org/simple \
flask-cognito-lib
- name: Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 82e69e4

Please sign in to comment.