Skip to content

Commit

Permalink
Merge pull request #215 from bertsky/circleci-cd-add-pypi
Browse files Browse the repository at this point in the history
CircleCI: add CD via PyPI
  • Loading branch information
bertsky authored Aug 2, 2024
2 parents 2847656 + dc0d83f commit 539c828
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
23 changes: 22 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
- run: sudo make deps-ubuntu
- run: make install
- run: make deps-test
- run: make test
- run: mkdir test-results
- run: make test PYTEST_ARGS=--junitxml=test-results/test.xml
- store_test_results:
path: test-results
- run: make test-cli
- run: make coverage
- codecov/upload
Expand All @@ -42,6 +45,15 @@ jobs:
command: echo "$DOCKERHUB_PASS" | docker login --username "$DOCKERHUB_USER" --password-stdin
- run: docker push $DOCKER_TAG

deploy-pypi:
docker:
- image: ocrd/tesserocr
steps:
- checkout
- run: pip install twine build
- run: python -m build .
- run: twine upload dist/*


workflows:
build:
Expand All @@ -51,8 +63,17 @@ workflows:
parameters:
python-version: ['3.7', '3.8', '3.9', '3.10']
deploy:
when:
condition:
equal: [ https://github.com/OCR-D/ocrd_tesserocr, << pipeline.project.git_url >>]
jobs:
- deploy-docker:
filters:
branches:
only: master
- deploy-pypi:
requires:
- deploy-docker
filters:
branches:
only: master
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [ "master" ]

env:
IMAGE_NAME: ghcr.io/ocr-d/tesserocr
IMAGE_NAME: ghcr.io/${{ github.repository }}

jobs:

Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include ocrd-tool.json
include README.md
include requirements.txt

0 comments on commit 539c828

Please sign in to comment.