Skip to content

Commit

Permalink
change to formal pypi deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Chenying Zhao committed Apr 18, 2023
1 parent ece3a52 commit c0e3142
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version: 2.1
# TODO: add tests from flake8

jobs:
pytest:
pytest: # run pytest
<<: *dockersetup
resource_class: xlarge
working_directory: /home/circleci/src/babs
Expand All @@ -32,7 +32,7 @@ jobs:
steps:
- run: echo Deploying!

deploy_pypi:
deploy_pypi: # deploy to pypi
<<: *dockersetup
working_directory: /tmp/src/babs
steps:
Expand All @@ -46,10 +46,8 @@ jobs:
name: Upload packages to PyPI
command: |
python3 -m pip install --upgrade twine
python3 -m twine upload --repository testpypi dist/*
# TODO: change back to normal pypi by removing `--repository testpypi`!
# not sure if only `babs*gz` is needed
# not sure if this is needed in `twine upload`: `wrapper/dist/babs*`
python3 -m twine upload dist/*
# NOTE: if want to test with test pypi, add `--repository testpypi` after `twine upload`


workflows:
Expand All @@ -67,17 +65,16 @@ workflows:
- deployable:
requires: # should require all jobs' success before deploying
- pytest
# filters: # run when main branch + tags
# branches:
# only: main
# tags:
# only: /.*/
filters: # run when main branch + any tags
branches:
only: main
tags:
only: /.*/
- deploy_pypi:
requires:
- deployable
# filters: # runs for no branches but runs for any tags
# branches:
# ignore: /.*/
# tags:
# only: /.*/
# TODO: uncomment out filters for deployable and deploy_pypi!!!
filters: # runs for no branches but runs for any tags
branches:
ignore: /.*/
tags:
only: /.*/

0 comments on commit c0e3142

Please sign in to comment.