Skip to content

Commit

Permalink
Pushlish using pypi api token (#1409)
Browse files Browse the repository at this point in the history
*  Changed to publish using the API token instead of user authentication.  Got the following error when attempting to publish to pypi.
```
403 Username/Password authentication is no longer supported. Migrate to
API Tokens or Trusted Publishers instead. See https://pypi.org/help/#apitoken and
https://pypi.org/help/#trusted-publishers. Access was denied to this resource
```

* publish to pypi test was not executing.  fix so that it runs
as part of the test job in CI.
  • Loading branch information
zaro0508 committed Jan 13, 2024
1 parent 3ba1cf8 commit 828e627
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ jobs:
name: Test upload to PyPi
command: |
poetry config repositories.test-pypi "https://test.pypi.org/legacy/"
poetry publish --build -r test-pypi -u $PYPI_TEST_USER -p $PYPI_TEST_PASSWORD
poetry publish --build -r test-pypi -u __token__ -p $TEST_PYPI_API_TOKEN
deploy-pypi-prod:
executor: python/default
steps:
- checkout
- run:
name: Upload to PyPi
command: poetry publish --build -u $PYPI_PROD_USER -p $PYPI_PROD_PASSWORD
command: poetry publish --build -u __token__ -p $PYPI_API_TOKEN

deploy-latest-dockerhub:
executor: docker-publisher
Expand Down Expand Up @@ -251,10 +251,8 @@ workflows:
requires:
- unit-tests
filters:
tags:
only: /^v([0-9]+)\.([0-9]+)\.([0-9]+)(?:([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
branches:
ignore: /.*/
ignore: /^pull\/.*/
- deploy-docs-branch:
context: sceptre-core
requires:
Expand Down

0 comments on commit 828e627

Please sign in to comment.