Skip to content

Commit

Permalink
ci(PyO3): add automatic publishing to Pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Rosenkranz-Costa committed Nov 9, 2022
1 parent 5c81d71 commit adb2e1a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ test_python:
stage: test
script:
- pip install --force-reinstall target/wheels/cover_crypt*.whl
- python src/interfaces/pyo3/tests/test_cover_crypt.py
- python3 src/interfaces/pyo3/tests/test_cover_crypt.py

test_cloudproof_js:
image: node:16
Expand Down Expand Up @@ -227,6 +227,14 @@ cargo_publish:
- cargo publish --token $CRATES_IO
- rm -rf /tmp/${CI_PROJECT_NAME}

python_publish:
stage: publish
rules:
- if: $CI_COMMIT_TAG =~ /^v\d+.\d+.\d+$/
script:
- pip install twine
- twine upload -u "${PYPI_USERNAME}" -p "${PYPI_PASSWORD}" target/wheels/cover_crypt-${CI_COMMIT_TAG}*.whl

# Finally, run benchmarks at once
benchmarks:
stage: publish
Expand Down

0 comments on commit adb2e1a

Please sign in to comment.